It's research. You set out to build a plane and end up with a space ship. Or a glider -- most often a glider. If you were my student, I wouldn't say "I gave you the problem". I would probably say that I started you on a research direction.
Two years ago, a friend of mine gave me an idea and I tried to follow it. His idea seemed to lead nowhere. At some point, I read some paper I found by accident and found a way to continue his idea that he most likely couldn't have thought about. I did calculations and wrote a paper about it. Because he gave me the starting idea and constantly provided feedback and suggestions, I put him as last author on that paper.
Usually, advisers get authorship that way. In other words, they start you on a problem, and as you progress, they try to guide you and suggest you resources that could help you. You do start with their idea, which is often wrong, you do the work, and get something that is new. If it comes to authorship, some think that it's enough to get it if they just proposed the problem to you and did nothing else. I think that's not ethical, but it's hard for a student to enforce ethics.
The situation is different if the adviser has some strong indication of what the result of the proposed problem should be. That means he already did some work on the problem and needs you to finish. Then he deserves authorship even if he does nothing but point the problem out to you.
So, "giving the problem" and giving you a direction to work in is quite different. In the first case it's like you're a miner, and your boss tells you to continue digging a given hole because there's gold in it. You find the gold, he deserves a cut. But suppose he tells you to dig a random hole. You find no gold, you move to another hole, and find it there. He doesn't deserve a cut in that case, but he deserves thanks for letting you know that digging in a hole might lead to gold.
If it was business, the professor would get nothing beyond thanks, because they usually say that ideas mean nothing, it's only the implementation that counts.