A lot of people are commenting about human nature and its role in partisan systems forming. As a matter of interest, I think we can expand on this by comparing the Westminster system used in the UK and several Commonwealth countries.
For specific examples, I'll be using Australia to illustrate, as (a) it has a single written Constitution, unlike the UK, and (b) as an Aussie it's the one I know best. But I think that what I've said below is also true of the UK, and probably mostly true of other Westminster democracies.
In summary, political parties are mostly absent1 from the written law, but are a key element of convention. And convention is perhaps equally important as written law in how a Westminster government works.
The Executive and Legislature
Notionally, the executive and the legislature are separate bodies, although by law and/or convention2, all members of the executive (aside from the head of state) are also members of the legislature. And notionally, it's the head of state who appoints the other members of the executive (the ministers).
In practice, the head of state first picks the head of government (the Prime Minister), and always chooses the leader of the party that has a majority in the legislature's lower house. The other members of the executive are whoever the Prime Minister tells the head of state to appoint3.
Consider what happens when no party has a majority in the lower house. The head of state decides which party is more likely to consistently get its votes passed by cobbling together enough support from outside the party. That party's leader becomes PM. If that shaky ability to win votes doesn't last, the legislature gets dissolved and an election is held.
So to run the government, you have to have the reliable support of a majority of legislators. That practically requires that parties exist, and that party members consistently vote the same way.
Election systems that favour major parties result in more stable government, and so are more common, even if they're arguably less democratic. More specifically, since it's a majority in the lower house that you need, the lower house's election system is almost always one that favours major parties. (In the UK, it's first-past-the-post; in Australia, it's single-candidate preferential.)
The upper house (where it hasn't been done away with) is expected to be more diverse and can have completely different election system. (The UK's House of Lords is unelected, while Australia's Senate is elected on proportional representation.)
The notion of power being tied to a party is so ingrained that the currently-dominant party is called "the Government" for short. Technically you could say that this refers to the executive, but in practice it also includes non-minister members of the legislature.
Further reinforcing not just a party system, but a two-party system, is the role of the Opposition (entirely a matter of convention). While the dominant party is the Government, the runner-up is the Opposition. Their job is to scrutinise the Government's actions, and present an alternative set of policies for the voters come the next election, because they (unlike minor parties) have a realistic chance of being the next Government.
Even the very layout of the legislative chambers is based on a two-party system. The Government sits on one side, the Opposition on the other, and minor parties sit on the "cross-benches".
The voting public knows and accepts the conventions, probably better than the written law. They almost universally choose a party to vote for (or against), not a candidate.
An interesting situation (and very topical in Australia) is a change in party leadership. When the reigning party's leader loses that leadership due to internal issues, that naturally results in them also being removed as Prime Minister. This tends to annoy the voters, who see themselves as "voting for a Prime Minister" at election time5, even though technically only one electorate directly voted for the PM (who is also their local member).
You could imagine a non-partisan government, where the head of state actually uses the power that the written law gives them (but which convention says they should never use) and picks whoever they damn well please to be in the executive, regardless of party. But it just doesn't happen4; it'd be seen as a flagrant breach of convention and a slide towards dictatorship.
1 Originally, the Australian Constitution didn't mention parties at all. A later amendment added a requirement that, when a senator gets replaced, their replacement has to be from the same party.
2 The Australian Constitution allows non-members of Parliament to become ministers only for a limited time. In practice, it just doesn't happen.
3 This decision may be made at the Prime Minister's own discretion or by the party caucus.
4 A unity government is kind of close, but not really.
5 Or at least, the media can always sell the story that the people's chosen PM was kicked out by undemocratic intra-party squabbling, not an election.