The rule was created to prevent offensive players from "cherry picking" near the opponents' goal. Without the rule, offensive players could hover near their opponents' goal even when the play is on the other side of the field, with the hope of a long pass and an easy goal. The offside rule still allows for the chance to score.
http://www.wisegeek.com/what-is-offside-in-soccer.htm