This is something which is hard to get used to. I find it helpful to think of the -po as a replacement for 'is'. So instead of 'is', Swahili speakers need to use 'po/ko/mo' which means essentially 'is located'. But then you still need the equivalent of 'at' which is the '-ni'. So, he/she is at home "Yupo nyumbani." They are at the market, "Wapo sokoni." In some cases the -ni is not required, like with place names, "Yupo Nairobi" (he/she is at Nairobi).
This may vary between British and American English (at hospital vs. in hospital), but Swahili does have a different way to say that someone is specifically 'in' or 'inside' the hospital. Rather than yupo, it would be yumo (I think...).
When it comes to locatives, -ku is more general, -po is more specific, -mu/-mo is specifically 'inside of'.