Why do you have to bond the neutral and the ground wire in the main panel? Not in separat ？I don't know how that works
The reason the neutral and ground are separate other than at the main panel is to prevent a parallel ground path. The power received from the power company (in the US is 240VAC) This is derived from a step down transformer close to you home. At this point the center tap of the transformer is grounded providing 240 v across the transformer or 120v from each end to the center tap. At the house there is another ground usually a #4 or #6 copper wire coming from local grounding electrodes the grounding electrode(s) or the grounding electrodes system is there to provide a path for ground faults not as a neutral. This also provides a ground reference for the center tapped neutral to prevent the system voltage floating above ground and creating an unsafe condition if the supply from the transformer grounding point fails, it may be several hundred feet away from the home where the service grounding electrode system is very close to the service panel. So the grounding electrode(s) are there to help clear a fault and provide a true ground reference.
Neutral is normal current return (like electronics GND/Vss. Note how your car is not like this!)
Equipment safety ground is exclusively a safety shield
Totally different tasks and purposes that are incompatible - one wire can't be both.
Generally mains wiring is wired very similar to an isolated system -- that is, both the hot(s) and neutral are fully isolated from chassis/building frame/equipment safety ground.
However, isolating means the hot+neutral voltage could float to thousands of volts as compared to earth, and insulation can't handle that.
A single neutral-ground equipotential bond prevents it from floating. One hot wire is bonded to ground, and because it's near ground, it's called Neutral.
However if there are two bonds, then between the two bonds, the ground is simply a parallel neutral, and so it is ineffective as a ground.
Another factor is that if current leaks from hot to safety ground (a ground fault), you want that to flow enough current to trip the breaker. A nice beefy neutral-ground equipotential bond assures this.