Maybe because some money is better than no money. Foreign companies likely don't think the way US companies do: these days in the US, if a large company can't be #1 or #2, with an insanely-huge profit margin, they just throw in the towel and go chase after something else (usually failing, whereas they would have made a lot more money just sticking in there and making lower profits as #3, #4, or #5). In other countries, they don't always have this mentality. What's wrong with being #5 and making a small profit while your employees have good jobs and your executives have handsome salaries? Maybe the shareholders won't like it as much, but who cares; if you're a large enough company, you shouldn't need outside investment anyway.
Also, these other companies could be taking the long-term view: it's better for them to hang around and outlast the others, and wait for them to make a misstep, or for people to get sick of their high prices.
I'm not criticizing the idea of being further down the chart than #2. I actually think that's a very healthy thing to have—which is why I think the way things currently operate is a bit skewed. Because when you think about a chart with #1-5 on it, you generally think that maybe #2 is, say, 20% less in profit than #1, and then #3 is around 20% less than #2, and so on. But that isn't what we're seeing with the smartphone market right now: #1 has something like 80-85% of the profit, #2 has 14-19%, #3-5 share the last %, and everyone else (and there's a bunch of them) are losing money.
It just seems to me that there is, in fact, a market for a smartphone that costs somewhat more, but is well-designed, robust, and (though I personally am fond of their products) not Apple. (And not Samsung, either.)
And again, I'm not intending to express strong criticism of the commodity phone makers here—really more a sense of bafflement that there's essentially no one filling that space and making a profit by doing so.