I've lived in a couple of flats in Sweden that did it that way, mainly because the bathrooms are so small there is no space there for a washing machine.
Although by far the most common solution is to have no washing machine in the flat and a shared washing machine in the basement
Although by far the most common solution is to have no washing machine in the flat and a shared washing machine in the basement