I agree with @TheLittles. The laptop was definitely not properly prepared for sale by the previous owner and the laptop is most likely still being managed by an MDM form a previous owner (not necessarily the person who sold it to you).
What to do before you sell, give away, trade in, or recycle your Mac - Apple Support
Your experience here is why I always recommend people to perform a clean install of any pre-owned device by erasing the device followed by reinstalling the OS even if the previous owner has already done so. This will ensure the device is using a good pristine copy of the OS and many times will alert the user to any problems such as what you just discovered.
People must be extremely careful purchasing used Apple products these days due to all the hardware, software & security changes. It is best to only buy directly from Apple, or an authorized reseller, or from a vendor with a well known & respected reputation.
If you purchased this device through your employer or school (even if brand new), then the laptop was probably automatically enrolled in their MDM management system. Only they will be able to remove it from their MDM.