In fact, it requires attestation: even if you install Google Play on some Android in an emulator/container/VM, on an alternative Android distro or in a rooted device, the app will not accept it.
The point is that the signatures are compared against a database of certified builds - and that exists on Google servers.
If you want AOSP attestation, you need to build your own database to compare against.
It exists on Google's servers for lock in reasons alone.
Which makes sense for them - after all, that makes their competitors break and their ROM doens't.