Because the British home nations were playing international matches four decades before internationals became a thing and they represent a unique and anachronistic component of international football.
England and Scotland played the first international match against one another in 1872 I think. You didn't start seeing international matches against other nations until the 1910s and British participation in the World Cup didn't even occur until the 1950 tournament because they didn't recognize FIFA's authority over internationals until that point.
The only other competition in which you see that arrangement is in the Commonwealth Games and the Rugby World Cup, for similar reasons. They compete as Great Britain in Olympic football and rugby competition, for instance. Football and rugby are really the only exception to the rule that exists, but they do so for historic reasons (inventors of the sport who played domestically far longer than other nations and wished to create inter-British competition).
When Rory McIlroy has to choose a country to represent at the Olympics for golf, he only gets to choose Ireland or Great Britain. He doesn't get to choose Northern Ireland as an option. George Best got to play for Northern Ireland in football because of the precedent.