Because of the constitutional position of the monarchy vision a vis parliament, as set forth in the 1688 Act of Settlement.
The PM is 'his majesty's prime minister'. The political remit of the sovereign was completely curtailed by the Act, but the assertion that parliament's authority came from the sovereign was a convenient way to avoid future civil wars over succession or the balance of power between parliament and sovereign. These were hot button issues throughout the 17th century, under the Stuarts.
Over the centuries, parliament has become even more entrenched and its powers have become more and more real and tangible while the monarchy's role has become more and more ephemeral and symbolic. Nevertheless, the polite fiction of the sovereign as the source of parliament's authority remains.
Now that AMW is no longer a prince and just a relative of the monarch, existing in a sort of limbo, the PM has decided (presumably on the advice of constitutional lawyers) that he can make public statements about how he thinks AMW should conduct himself. This would not have been considered possible before AMW was stripped of his titles - he would have to have got the nod from KCIII before making a statement.
He actually could have pushed the envelope, but that is not how things are done. The niceties have to be observed. It may well be that he had some sort of nod from KCIII to make the statement he made.Stuart's.
And no, the UK is not technically a democracy. It is a constitutional monarchy.