Yes, in the US, 14 CFR part 250.7 means that they can't throw you off after you're checked in and your ticket has been scanned at the gate during the boarding process. It was changed by Congress after that doctor got thrown off a United flight in 2017. The airline can still throw you off if you're disruptive, and my understanding is that a pilot in command can order you off for pretty much any reason, as they have full command of the aircraft, so if you're ever in that situation then you better follow the pilot's instructions. But if the pilot does throw you off due to a bumping situation then the airline is breaking the law.
Airlines can also make their own policies on which passengers have the highest priority to get bumped, which can involve check-in time, and I imagine can involve basically who is at the gate, ready to go. So there are some advantages to being there and queuing early.