I don't really get the point of it. What was the initial intention when this rule was created?
It's extremely easy to kick a football half the length of the field or more (and for a notable portion of players, from one penalty area to the other).
Without a rule limiting attackers to be not beyond the last defenders, the attacking team is forced to build play throughout the field, with long balls an option only suitable in certain situations rather than being the superior choice in a majority of the time.
This results in a competitive game based on the work of the team as a whole, rather than two or three individuals who either kick the ball a great distance or are adept at trapping, volleying or otherwise receiving the ball to score.
The offside rule encourages all the players to be actively involved in the game, which leads to a more entertaining game. Think about what would happen if there were no offside rule.
The attacking team could then place one or two strikers close to the goal, and just wait for a long pass. Against a lone goalkeeper, it is a non-contest. To prevent this, the defending side would be forced to permanently position two or three defenders close to their goal.
If both teams did this, the game reduces to a volley of long passes, which makes it very boring to watch (and play).