Poor ventilation. The walls are surfaced with drywall, which is gypsum, which absorbs moisture, which makes paint peel. You can redo the walls with waterproof material, which is used for tile, so you can either paint or install pretty tile. A cheap fix is to install an exhaust fan connected to the light.
I think it is due to the room's temperature extremes. When coated along the surface of a wall, paint acts as a solid and thus expands and contracts with the constant heating and cooling. Over time, this constant and rapid expansion and contraction causes the paint to break apart thus causing flaking and chipping.
Paint quality and the condition of the wall onto which it was applied. Bathroom paint is not destined to peel. The walls do have to be prepared by killing any mold and filling/repairing any holes prior to painting, The walls must be primed with oil-based Kilz and a high quality satin or semi-gloss paint applied.
Bathrooms are where we bathe. Bathing spread moisture. Moisture makes paint peel, both indoors and outside. How to avoid this: 1) good drainage 2) ventilation. 3) stop bathing.
My ancestors were in the house painting/ interior decorating business since 1879. (none of this generation does it anymore) Anyway, I used a brand of paint called 'American Tradition', a Valspar off brand that has a 'lifetime warranty' when I painted my new house. You will need to cover up the old paint with a primer/sealer. Ask a paint store salesperson for the correct type of primer/sealer. (I have no peeling paint after 14 years)