Republics seem to manage state occasions without gilded coaches and royal families. Some pomp, sure, but cars rather than coaches. There’s no need whatsoever for a royal family.
Like it or not, the history of the UK’s constitutional monarchy, and the pomp and glitter associated with it is one of the UK’s few, and key, USP’s on the world stage. Heads of State actually want to come on a State Visit here. That makes the Foreign Office’s job that much easier.
Luckily, we live in a democracy where you are free not to like this, but it doesn’t mean it’s not true. The Queen’s recent funeral and the worldwide attention and coverage it revived, not to mention the world leaders it drew (former US presidents had to be regretfully advised they couldn’t attend…) is a good demonstration of the soft power it gives the state.