Even if things and processes have a transcendent purpose for which they're 'good' for following and 'evil' for contravening, we can't access this purpose directly, not through instinct, nor through logic.
Therefore, I propose a new definition of purpose, a completely functional one.
If it becomes obvious that a process's purpose cannot be fulfilled, it will be terminated. So if you find something that needs to be true so that no one will decide to terminate the process, then that is the purpose of the process.
Notably, all so-called objects can be rearranged, conceptually, into processes. This is partly because of decay, such as a hammer actually being an arrangement of atoms that are currently being hammerlike, but are proceeding inexorably toward a film of rotten wood and a rusty lump.
Partly, by using this new definition of purpose, we can talk about the process of owning a hammer, and using it for hammering. A hammer that's not used for the purpose of hammering isn't a hammer anymore. For instance you could use a hammer for a display, but if it's permanent, it's not a hammer anymore, but a decoration. The process of owning a hammer has ended, while the process of owning a decoration has begun.
In the case of the hammer, if the hammer breaks then it can't be used for hammering anymore. It will be thrown out. The process of owning a hammer will end. In the case of the hammerlike display, if it becomes ugly (and the owner is rational) then the hammerlike object will be thrown out.
Therefore, if the purpose of a human is indeed to be happy, then if it becomes obvious that a human cannot be happy anymore, then they will kill themselves. More often, perhaps their immune system will collapse and they will die of infection or senescence.
Similarly, using this definition, you can usefully analyze much more abstract processes, such as philosophies or political formulae.
If it becomes obvious that the purpose of a philosophy cannot be achieved, then that philosophy will be forgotten. Similarly, if it becomes obvious that the purpose of a political formula cannot be fulfilled, it will be discarded.
By working backwards, if you solve the relatively easy problem of, "What will cause this body of thought to be discarded?" you can work backwards to the purpose.
You can also play a game with this, by turning this method on non-artifacts. What is the purpose of a rock? Well, the rock isn't really owned, so it can't be discarded. Using this definition, we realize that talking about the purpose of natural objects is meaningless.
Alternatively, you can say that that since the rock can't be discarded, then its purpose is always fulfilled, no matter what it's doing or what happens to it.
Even further, you realize that for the universe to have a real purpose, it needs an owner. In other words, a God. Still, this is, as usual, a buck-passing scenario. If God owns the universe, who owns God? Notably, if your God is perfect, they cannot change, and thus can't be said to be owned at all, even by themself, which naturally nukes purposes further down the line as well. If God can be said to have no owner, then any purpose defined by God can't be said to be owned, and is thus more or less just an illusion. If your God is imperfect, then you have to find out what reflexive ownership means. The consciousness owns itself because it controls itself, but that means it defines its own purpose, which means the purpose is arbitrary.
Rocks are fun, eh?