Because there is a list of who owns what. Remember you're advertising these routes not just in your organization but to the world.
I /u/propulsions own 172.30.0.0/23. That subnet is associated with my own personal ASN of 64550. If you /u/daveba123 advertise my prefix with your ASN of 64560, I can prove that you're doing so mistakenly or in bad faith.
172.30.0.0/23 is RFC 1918 private address space. It is not routable to the world. 64560 is also private AS space, not advertised to the world.
Only public (routable to the world) ip address space and ASN's are registered. The rest are free to use for any organization inside of their network boundaries.