You could remove the battery when its charged and stay on the cord. Because battery life is heat-related. And leaving a charged battery in the laptop when you have a cord is chewing up lifetime without benefit.
And even when it appears to work, it may result in the processor being throttled so as not to overtax the power adapter without the battery available to supplement it.
Are there really laptops where you can't remove the battery when connected? I've never had one that wouldn't keep running when you pull the battery when on ac.
However the reason I know this is the same reason I keep mine in: I've dropped every laptop I've ever owned on the floor multiple times, and I've had one or the other of battery or charger cable fall out at least once for all of them, at least with the battery in the chances of losing power is reduced (though I have on occasion had both fall out at the same time).
Many laptops (such as all current Apple models) have built-in batteries. I guess you could remove the battery with special tools, but putting it back in may require re-gluing things.