They got their hearts' desire. Yes, granted, they both already had what they each thought they lacked. Neither of them knew that before the journey to Oz, though. It may have been that the journey taught each of them a way to find what they needed (the lion found his inner strength and the tin man found compassion). By the end of the journey, however, the readers know this but the characters (who still see themselves as the people they were at the beginning) do not. They need an external voice to affirm it. It is important that the wizard is no all powerful being, because it shows the lion, the tin man, and the readers that no one can give us qualities that we don't already have. All anyone can ever do for us is recognize that which is already within us and, if necessary, point out the obvious in a very very loud voice.