Are dams and levees built by soldiers? Why is that? What else do they do, freeways?

I’d heard of the Army Engineers making levees and it seems wrong. Why are the military doing civilian work?