I mean you're supposed to leave it in for a bit yes, but it's not for the scalp.
The shampoo is not really for the hair, it's primarily to remove the sebum from your scalp. You naturally get most of your hair with it too, of course and it does serve a purpose in removing grime from the hair, but the main point of shampoo is to clean the scalp.
Depending on the type of shampoo you use, you'll know that your scalp is clean once the shampoo foams up. See, the surfactants in the shampoo bind to the fats on your scalp, and that doesn't foam. Once there are no more fats to bind to, the surfactants will just foam instead. Many cheaper shampoos are specifically made to foam though, so it's not always a good tell.
Once the shampoo is rinsed out and your scalp is squeaky clean (like, literally squeaky, when you rub your fingers against your scalp it'll squeak) then you apply conditioner. I apply it from the midsections and work it down towards the tips.
Hair strands are sort of covered in little scales, and the shampoo serves to open these scales up. The conditioner helps close them again. The sebum that the shampoo washes off protects the hair, and so you use conditioner as a kind of replacement for that. Your scalp doesn't need that, it'll start producing sebum pretty much immediately so if you put conditioner there, then your hair just gets greasy faster. The reason you focus on the mid section and tips rather than the roots is simply because that hair is older, and more prone to breakage. That is, in addition to the fact that the roots are close to the scalp and will get covered in sebum much faster.
That's the general idea. It's a lot more complex in practise. Everyone has different skin types, and produces different amounts of sebum, and depending on the shape of your hair strands it takes more or less time for the sebum to really get everywhere.
Then there are medicated shampoos and conditioners, and they may need to be applied directly to the scalp, it really depends. :)