Before painting I sanded all walls and then cleaned. I painted ceiling first then walls. Before painting walls I taped off a ceiling which was completely dry. Painted walls and the following day removed tape. Seeing wall paint was also being removed I used a knife to cut where ceiling and wall meet. It did not matter paint was removed around the whole bathroom.
Taping isn't commonly done in cases like that, but the issue is obviously a poor paint bond. Maybe you had dust on the wall, or maybe the sanding wasn't adequate at the corner.
Anyway, use a high-quality brush and re-edge your walls. A good technique is to hold the brush at a 45 degree angle with respect to the wall, press it in to feather out the bristles, then twitch the brush as you move along horizontally. This allows extremely fine control of paint flow. There are plenty of good videos on YouTube, too.
I also recommend removing tape almost immediately after painting, for two reasons:
- Dried paint acts as a film, which obviously has to be torn or cut to prevent damage and ugly edges.
- Torn or cut edges are much more harsh than edges that dry after removing the tape. They can shrink and soften as they dry, resulting in a nicer finished appearance.