What is the rule to put grounding in the circuit schematic, and what is that grounding for?
In most electronics, the Ground symbol simply marks the point in the circuit that we consider "Zero Volts" - the reference point for voltage measurements elsewhere in the circuit.  It is the point in the circuit where we connect our meter's black lead, or oscilliscope ground clip.

Circuit simulators require a Ground symbol somewhere on the circuit so they know what point we want to consider "Zero Volts".

The Ground symbol in most circuits does not imply a connection to the earth.  We can talk about "Ground" when discussing aircraft wiring, or your battery-powered circuit on a breadboard, where there is no possibility of a connection to the earth.

However, in AC power wiring, the Green or bare Ground wire really is (or should be) connected to the earth.