"Why am I here?" is not the same as "What is my function?". There is no specific function you need to fulfill, unless it is that which you feel called to do. And quite often it is what you want to do, even though the outcome of the idea is not successful at first. In the end we might think that we haven't reached our goals, but as long as we aren't dead yet, there is always a chance at success!
My life's experience is though, that I tend to repeat certain patterns towards full manifestation of the goal, coming closer with every step.