If it's winner takes all then you're right. The head of state is indeed in charge of all departments.
If it's more of a parliamentary system then the head of state needs to put x members in charge depending on the outcome of the vote. So if there's x percentage points of the population who voted for the opposing party then x percentage members of the cabinet should be of the other party.
When it's not winner takes all, it doesn't matter if a percentage of the population thinks someone is a weak leader. The other percentage will still have a say in the executive branch of the government. It becomes trickier as a leader because you not only have to have support of your own party but also from your coalition partners. (EU multi-party politics in a nut shell)
Before anyone responds, I'm not claiming this is better or worse than other systems!
I think you're confusing "parliamentary system" with something else.
Good point. I'm in the US, so it's overwhelmingly 'winner takes all.'
Corruption is the obvious one. Keep in mind that running for elections has a cost, people that pay for it are more likely to expect to gain something in return.
There is also the non-obvious but still existent problem of the Law simply getting in the way, so decision makers try to act outside of it.
"Advertising" can get you to the place where the U.S. is well where you can get 49% of the population who have 51% of the influence to think one party is legitimate (e.g. they take money from the koch brothers, kiss the ring of every republican donor, promise not to raise taxes; the left wing version is "green new deal", "tear up men accused of sexual harassment", ...) and not care what the other people think.
In political reality, you want to own the truth, and establish the narrative, and you never want facts to get in the way.
Would be the cynical take.
An aspiring head of state that desires personal access to the state's funds will prefer accounting practices that are irregular, and will outlaw whistleblowing on these practices.
You may wish to be a noble ruler, setting just institutions and regulations for the smooth operation of society. A petty ruler would wish to enrich themselves and their friends and not worry about the consequences.
Is there any reason why someone who is more interested than me in becoming a head of state may think otherwise?
[1] which I define politically as “could I get a headline out of lowering income tax, national insurance, or non-UK equivalent term, by cancelling this line item?”, and I think the EU counts as such for the UK. 1% GDP, IIRC.