iCloud and AppleID 'married' to Macintosh
The tie of an AppleID to a device is associated with the "Find My" capability. On an iPad or iPhone, this tie to the given AppleID makes it so that new users of the device cannot wipe it or change the AppleID without providing the previous user's AppleID login credentials.

The good news is that the tie to an account is not as "strong" on an iMac.  For that device, you can merely reformat the drive and install the desired version of MacOS.