Are the evolutionary changes we seen in creatures occur with a purpose? or is it just due to random changes over millions of years?

It just came to me that evolution seems to be purposeful... meaning it seems to me that an organism changes/evolves almost(!) as if because it "wants" to change. In previous conversations we were talking about evolution happening as a series of mutations that results in benefit to the organism and that organism passing on that change to the succeeding generations. But lets take a look at these "mutations".. if these are just random changes then how did "random" changes push some sea creatures to generate anatomic structures to enable it to survive on land? Fins are said to have developed into feet/legs. Can random mutations actually develop that? to me these seem to be mutations with a direct purpose FOR the organism...that is to develop legs... if that is the result then can it actually develop from a random mutation? or lets take it in another way.. why did the wolf like creature that eventually developed into whales loose their hind legs? did random mutation just shut down those genes for leg development? Some say its because of disuse and eventually the whales lost them. But if its simple disuse, i would expect whales to STILL be born with legs that gradually atrophies as it grown older. But instead a whale is born without legs at all (at least with bone remnants)... to me this is like evolution is intentionally shutting down a system. If evolution is shutting down a locomotion system for the animal can that be a random occurrence? I find random mutation hard to achieve this kind of changes.
Can random mutation over millions of years actually drive the changes we see in animals including man. Or is there something more amazing happening with evolution... creatures developing something unique because it actually wants to evolve that way.... (i hope that made sense). Random? or somehow with some kind of "purpose"?