It might be because it's easier to become friends with someone who is having the same experience as you and understands what you're going through. It might also be comforting not to struggle when expressing oneself.
Events for foreigners (language exchanges clubs for example) can be a good start to make friends abroad. Being part of a charity is also an option. But it all depends on the length of your stay in the country in question :)