Wales, Scotland, and England have their own teams (Northern Ireland contributes to the Irish team). The common explanation I've seen is that the nations have deep, distinct histories and cultures, but that doesn't explain why, for example, India doesn't get to send a team from each state despite India's ethnic groups being even more diverse and distinct than those of the UK.
So what is the actual reason for Britain into three parts for the purpose of international sport but not other countries?
The prosaic answer is that they each have their own FIFA-recognised national football associations.
More broadly, little about the UK makes logical sense. It just sort of ... happened that way. Lots of history, lots of it pretty fucked up, and here we are. A funny little collection of islands off the coast of France.
If it's any consolation, the nations making up the UK don't live in perfect harmony. The Scots and the Welsh hate the English, the Northern Irish hate each other, and the English largely tend to forget that Scotland, Wales and Northern Ireland exist at all, except perhaps as somewhere pretty to go for a nice holiday where it's kind of like England except they talk a bit funny.