The nation-state promotes nationalism through the idea of 'us' and 'them' - the existence of an imagined national community, superior to every other state, creating a never-ending tension between each of them. In the extreme, wars are fought because of this existing natural conflict. More commonly, sport is used as an outlet to express these aggressive nationalistic tendencies.
I am not saying here that there is an inherent problem with competitive sports – everyone enjoys some healthy international rivalry as an escape from mundane life.
However, in times of war it only perpetuates a conflict that has already spiralled out of control.
This does not make the decision to punish athletes for their government's actions fair, but they are unfortunately inseparably tied to them through nationalist discourses. Competing under a neutral flag may go some way to solving this issue, using a symbol which specifically states that they do not represent their country, but it does not get rid of the issue completely.
Scholars of nationalist discourses note that once a member of a nation, you can never 'unbecome' one. That is, you are forever associated with your nation, through these ideas of 'us' and 'them' used by every other nation in the world. So, unfortunately even though these athletes are not representing their country, it is not seen this way by the rest of the world. President Putin will also claim them as part of his 'national community' and so will benefit off their success regardless, to help fuel his propaganda to the state.
If anyone is to blame for the suffering of these athletes, it is less to do with the international sporting bodies, and a lot more to do with Vladimir Putin.