Why are dry docks (for ships) such a seemingly (relatively) rare thing?

Sure but they are nothing especially advanced or new. The oldest in the US was built in 1834.

At the end of the day they are a big hole in the ground with a door and water pumps. While impressive in size nothing really remarkable.