The domain name remains yours of course, although you could resell it to someone by providing the auth code, and then the buyer takes care of the transfer.
Many webhosts act as resellers for domain registrars.
This is perfectly legitimate but it is advisable to stick with reputable registrars. Many small companies are one-man shows - what happens if the owner has an accident, the business goes on autopilot mode and there is nobody to take over ?
Also, it is not recommended to use the same provider for webhosting and domain names. It's two different activities. A good webhost may not offer the best deal on domain names and vice-versa.
It is also about spreading risk. Some webhosts are quick to react to abuse and could terminate your account in case of DMCA or spam complaints (which could happen unintentionally, for example as a result of a hack), assuming they don't know you personally and therefore have limited trust.
It's not just the hosting that is at risk but also the domain names you bought with them. Another important rule: never hand over control of your domain name to a webmaster or some other party. In case of a commercial dispute (or accident), taking back control of the domain name could prove difficult.
It should be noted that even Icann-accredited registrars can be shady, a few have been terminated for various reasons including criminal convictions, and small registrars are still deaccredited from time to time, usually for non payment of fees and over compliance reasons.
Bottom line: do your homework, do research, do not do business with just anybody who happens to tick all the boxes.
In short: the domain name does not need to move and you host it wherever you want.