I know a set of retirement flats that have a communal washing machine room, but most of the flats still have their own machine.
Having lived in accommodation with shared machines before, I think one reason is that lugging baskets of washing up and down stairs isn't exactly fun, even if you aren't elderly. Another is that sharing is a pain - people leave washing in the machines when they're done, so the next person has to unload and leave it in a pile - if they don't steal it. Lots of opportunities for friction between users. Laundrettes can afford staff to manage things, where a per-building room probably wouldn't.
About the only useful purpose I can see is when you need a commercial-size machine for washing bedding or similar that won't fit in a domestic machine. That and avoiding the noise, which can be troublesome in a 40m2 flat.
Elsewhere, I think some people fit a storage container in their allocated underground parking space - like having a private basement store if you don't have a car.
Theo