Why do basketball players get millions of dollars according to economics?
The wages for people in any profession (asssuming government does not intervene) are set by supply and demand. Therefore, any profession that is highly paid must be highly paid because of supply and demand.
The price of basketball playing (a service) will be high if there is A) high demand for that service and/or B) low supply of people able to provide that service. In this case, both apply to some extent, though I'd argue that supply is more important.
There are very few people who are able to be excellent NBA-level basketball players. Because there are so few of them, they can command very high prices. In other words, a low supply of world class basketball players leads to high prices for their services.
Another way we can look at this is by culture. Each culture prizes certain things. We just live in a culture that prizes entertainment more than things like education or public services. So, basketball players and football players make much more than teachers and police officers. In my opinion, this shows the value system of our society and it would be great if thes values would change, at least a little.
Now, if we look at other cultures, sports really do not matter all that much. For this reason they do not get paid much at all. So, one important point to keep in mind is the sociological angle. And how money is allocated to various fields is a great way to get at values.