It is easy for a politician to get wrapped up in a "bubble" of their supporters, mostly meeting with lots of similar-thinking people.
If it goes too far, this can be dangerous.
Successful democracies often seem to have some kind of limitation or "check" on this tendency for people at the highest levels. The form of this check varies wildly. For example, in the Roman Republic, government proceedings against a Plebeian had to stop if a Tribune was present and shouted "I Object!" In the US, the Supreme Court and Congress are limitations on the President. In the UK, Parliament is one such limitation, but it may be filled with supporters of the PM, so the meeting with the Queen is another, in a different form. It forces the PM to talk with someone who may be thinking differently. That's useful in and of itself.
The Monarch is also watching out for the good of the country as a whole. He or she tends to stay a bit on the sidelines, out of the daily battles, but will get involved at critical times -- for example, if something really bad is happening, and the PM is not paying sufficient attention, or if it is becoming obvious that the PM needs to step down. If political opponents think the PM is a disaster, that may be easy to ignore. But if your Queen hints at that, the PM may be more likely to sit up and pay attention.
For all these reasons, the tradition is useful. Hence it survives.