you can operate the computer from the charger alone with the battery removed, but at a lower clock rate.
This can be done for testing, but you should not operate your Mac in daily use without a battery installed, for a completely different reason.
In Desktop computers, large capacitors in the power supply smooth out peaks and valleys in DC power to avoid having power spikes do damage to the electronics.
In notebook computer, the battery is used as a buffer, smoothing out the peaks and valleys and serving to protect the electronics from power spikes. Without a battery in place, your computer is more vulnerable to damage from power fluctuations.