If you aren't born with capital, and don't win the lottery, you can't pay people to build something for you.
You can work very hard, together with other people, and build something as a community. This is difficult and almost never happens in practice, as it requires extreme dedication and some alternate revenue stream to be able to live until the thing being built is done and can be used to produce ongoing value.
But when this does happen, the end result is in the ownership of the community, it is not any one member's to give away or sell.
Alternatively, if you are born with wealth, you can dispense with all that effort, and simply invest several fractions of your wealth in things until you hit on one thing that you can collect rent from. Sure, you'll do some work, but the money accumulated by your ancestors, often built on slave labor, monopolies, theft and other nice things, will do most of the work for you.
So if they own it, they can do what they like with it.
Including give it to their daughter.