Its all relative when evaluating investments:
A) It might be risky but pay a relatively high return. It could be the case that the local interest rates are high even taking into account a potential devaluation, or it could be the case that the investment is denominated in foreign currency, in which case the devaluation doesn't change the principal (although it does change the likelihood of default). Typically currencies appreciate after the central bank increases the rates in local currency, as foreigners are willing to tolerate more risk when the return goes up. (The "Sharpie ratio" is one way to measure the return relative to riskiness.)
B) The country can be temporarily uncompetitive. That is, if investors think it will be relatively better later on (less uncompetitive ), then they will be willing to bet on the country. (In other words, $R=(Dividend +Future Price)/Current Price$, which means that even if you expect low dividends or interest payments, your expected return could be high because the expected future price is high.