In this one reversed (bottom), the dark rock formation in the lower R/H corner holds the eye and then throws it up to the big rock. In the original the eye sweeps up unobstructed to take in the curling waves and also the big rock.
Portraits follow the same rule.
In this color portrait, the original framing lets the eye slide up the folds of the robe to the face and rest there, helped by the darker shade in the top left that says ‘Hold it!”
In the flipped version the eye gets to the face but then tends to slip further into the now paler space in the top L/H corner and the intensity of the expression is weakened. (I think so anyway!)
In a portrait, you can turn the subject’s shoulder towards the camera so it leads up to the face, or hands can fill this corner and lead the eye up to the face.
You can’t always get your composition exactly right, and some pictures stand by themselves because they appeal for different reasons.
Purely record shots like a snapshot of a friend or some event like a birthday is mainly for the purpose of having a memento and don’t even aspire to be anything else.
You can always bend the rule intentionally for an effect.
But once you get into the habit of seeing the composition of a scene you’ll find yourself shifting position or angle automatically to cater to the rule and your pictures will look better and feel more satisfying.
If you really want to learn about composition, how to take great photos and get good at this stuff we highly recommend Beginner Digital Photography as a resource.
It covers everything you need to know from beginner to pro in an interactive format you can study or refer to at your own pace and at your level of experience.