Sometimes a door seems to inexplicably swing open as if propelled by an unseen force.
simple fix. Pull one hinge pin out slightly, tap the exposed hinge pin with a hammer on its side to put a slight bend in the pin. Gently tap the pin back into the hinge. The added friction helps keep the door from swinging open or closed from being off level. Sometimes if a single pin doesn’t do the trick doing two or all three does the trick.