You’re confusing iOS, where you are in a walled garden, with macOS, where you can just do whatever the hell you want (There’s a recovery partition you can boot to where you can disable just about every bit of security that’s not hardware much like booting to grub in Linux)