Based on Wikipedia it was founded in the Czech Republic by three Russians in 2000 which makes it a Czech company just as much as Tesla is an American company (rather than South African).
edit: Fixed founding date, coffee hasn't kicked in yet
> Tesla was founded (as Tesla Motors) on July 1, 2003 by Martin Eberhard and Marc Tarpenning in San Carlos, California ... A lawsuit settlement agreed to by Eberhard and Tesla in September 2009 allows all five (Eberhard, Tarpenning, Wright, Musk and Straubel) to call themselves co-founders
No, not due to fear. It's just somewhat easier to sell their products using a EU based legal entity. Another example would be Yandex, registered in the Nethelands.
JetBrains main dev offices are in St Petersburg, Moscow, Novosibirsk.