They are inalienable and bestowed by their Creator. I.e. they are part of the innate nature of human beings.
Governments can either protect those rights or abrogate them - it cannot invent them.
And yes, they stretch back to when humans became human. Though it took a while for people to formally recognize them.