In ancient times because humans devised fundamental inventions such as the pulley,lever and wheel engineering concept has existed.
"Engineering" becomes from word engineer which was first used in 1325 when an engine'er(one who operates engine) originally referred to "a builder of military engines".In this case engine is called as a military machine like catapult which was used in war.Engine is even older origin,getting from the Latin "ingenium" (native quality, specifically mental power,a clever creativity)
Later,as design of civilian structures civil engineering became the first non-military engineering.
The first engineer (civil) that we know is with his achievement :
Imhotep,builder of the Step Pyramid at Saqqarah,Egypt probably in about 2550 BC.
Imhotep's successors-Egyptian,Persian,Greek, and Roman- developed civil engineering to exceptional heigths by using arithmetic,geometry,and a bit physical science.