Water Towers

What has changed in the world that water towers are no longer needed on buildings?
Surely pumps existed during that time. Besides, how did they get the water up there in the first place?
So what was their purpose, and why aren’t they needed now?

Why are water towers are elevated, while petroleum tanks are on the ground?

Quick answers: no, water towers are still mighty handy.
They get the water up there with a pump.
Their purpose is to give regular water pressure to the units/dwellings they serve, without requiring electric pumps.

My apartment complex is right next to a very large water tower. They’re not obsolete yet.

What makes you think water towers are no longer used on buildings? Many tall buildings have water towers right on top. The Sears Tower has a series of three water towers at varying heights inside the building. The towers are filled with an electric pump when demand for water is light; and they provide water pressure when demand is high.

Seeing as how the original post was from Chicago, I would assume this is in reference to all the old metal and sometimes wooden water tanks that were found on old Chicago buildings (anywhere from 3 to 8 or 10 stories in height). As I recall these were part of an fire protection system that was required in commercial buildings in Chicago due to limitations of firefighting equipment and the phobia about fire that existed in Chicago after the great fire. Technology and code changes have passed this by and they are no longer required. I remember a neat photo essay a few years ago that documented the varied designs and decayed status of these tanks.