Bathroom paint usually peels because the paint wasn't applied properly.
When painting any walls especially bathroom walls where moisture or humidity will be present you need to apply a primer on the wall first and then apply the paint.
The primer helps the paint stick to the wall better and when the wall isn't primed then the paint will peel especially if there's moisture or humidity like there is in the bathroom.
To fix the peeling paint you need to remove the peeling paint and then sand the wall down, apply some proper primer and then repaint the wall.