Well that presents a teleological problem.
To me intent means "motive" , a conscious desire, which suggests a form of consciousness.
But I prefer to think of it as a result of the law of "necessity" and "sufficiency"
Necessity and sufficiency
https://en.wikipedia.org/wiki/Necessity_and_sufficiency#
When sufficient resources are available, it may become necessary that a causal event manifests. This does not require intentional motivation.
Example: when sufficient amounts of H and O are present in sufficient density at sufficient temperature it becomes necessary that ice or water or vapor emerges from the appropriate combinations. And in the case of water, an additional necessary liquid quality of "wetness" emerges with the self-formation of water.
Self-formation does not require intent, it is a spontaneous mathematical function. IMO