Rugby football is named after Rugby School, the school in England where it was developed. Legend has it that one day in 1823, a senior boy called William Webb Ellis elected to run with the ball rather than retiring to kick it as was the normal mode of play in Rugby School football matches. “Running in” was not considered quite the done thing then but was later formalised in the laws of Rugby Football (first published in 1846).
Association Football was not formalised until 1863 and even then allowed handling of the ball, but not catching it and running with it. In the mid 1860’s an attempt was made to provide one set of laws for all football but there were irreconcilable differences, mainly concerning “hacking” (kicking an opponent in the shins). The “hackers” went on to eventually play rugby football even though hacking was barred a few years later. The “anti-hackers” went on to form Association Football, eventually banning any handling.