They tend to have very left-wing/socialist friendly governments, and instead of just building better products locally the governments have decided to just keep you from buying foreign things. Electronics are particularly hard to make and a desirable market, so they tend to have high tariffs or other limitations.
Famously in Brazil they had a very inward facing economy (propped up mainly by the socialist candidate Lula, who was later arrested on fraud charges). But one of the things they did was build a Blackberry factory which was a big deal at the time, however the phones were always years out of date and generally terrible