BITD, bikes were made in many more sizes than current ones are; some manufacturers offered frames in 1cm size increments. Since you would size a bike based on the standover height, the top tube could be parallel to the ground and still give you plenty of crotch clearance. In many cases, the seat tube measurement would be the same as the top tube, so you ended up with a 54cm X 54cm frame, for example.
Nowadays, frames are increasingly sized like T-shirts: S, M, L, XL. To make that work, manufacturers have to slope the top tube to achieve standover clearance for a much wider range of rider inseam lengths. So you get bikes with a 51cm seat tube and a 55cm top tube, and you use the seatpost and stem to dial in the cockpit.
Some claim that a compact frame with a sloping top tube is lighter and stiffer, but material and design are also factors there.