The Prime Minister doesn't have to change just because MPs/majority party changes, s/he doesn't have to be the leader of the majority party, or even a member of that party. S/he is selected by the Commons from amongst their number and then has to ask the monarch if they can form a government. Which is why a Prime Minister can step down at any time and not initiate a General Election.
no subject