Some older MacBook and MacBook Pro models reduce processor speed and GPU performance roughly by half when running without a battery, to avoid shutting down if the computer needs more power than the AC adapter can provide.
Apple documented the behavior in a support note. I’m not sure if the Apple Silicon models do the throttling as well. I guess the situation doesn't come up as often since the batteries are no longer user-removable.