Itās basically to prevent āgoal hangingā (players hanging around the oppositionās goalkeeper). Itās quite a simple rule. What makes it contentious is being able to tell if the player receiving the ball was behind all of the oppositionās defence players at the exact time the ball was kicked to them. Hence the introduction of VAR to digitally do what the official linesmen do (those officials running up and down the side of the pitch).
Other main rules include āfoulsā I.e. impeding another player - the severity of which leads to either a yellow card (a warning, but get two of those during a match and youāre off the pitch) or a red card (bad or dangerous foul) and youāre instantly sent off. Fouls committed in the penalty box area lead to a penalty.
You also canāt handle the ball hence itās called football š