I went to Uganda three years ago and I was amazed at their amiability and apparent happiness, especially considering their situation. I was greeted with smiles everywhere I went. I'm from Iceland and in comparison Icelanders are very cold. Perhaps the climate is a factor?
because you were a foreigner, a guest, an attraction.
i went to iceland and only found nice, cheerful people. i am from austria, so did blend in a bit. if you're nordic and visiting uganda your appearance alone makes you something special and easily recognized (and potentially wealthy, so treating you nice might pay off).
that's why being a short-term visitor teaches you practically nothing about a culture. you need to live and work there to actually see the true nature of everyday people, you're novelty needs to wear off.
exceptions to this exist, some cultures simply treat foreigners/tourists badly. classic viennese coffee houses have some of the most irritating waiters on earth, embodying the anti-thesis to the US-services-smile. try getting a cheque in under 5min, i dare you :)