when do I need to have a floating/non-floating input at a SMPS?
This circuit is not a nice example as it uses the same symbol for input (primary) ground and output ground. Only when you zoom in do you see that it has 2 grounds.

You talk about floating which would suggest that the primary ground is "floating" but it is not really floating, it is mains connected and unsafe to touch.

Look at the designs with a mains earth input, it will basically be the same circuit where the output ground is often connected to the mains earth.

What to choose depends on the user case. If a mains earth is expected to be present then it would be a good idea to use it.

The "floating" ground supplies will often have their output floating at around half the mains voltage because there is no ground reference. This might or might not be a problem depending on the usage. Series resistance is high, there is only the Y-rated capacitor between the mains side and ground. This capacitor should not be so large that the user will feel a "tingle".