When in Rome do as the Romans do. Do not go into a nation where you know you may be killed if you offend islam.
So yes, it is the atheist fault for putting themselves at risk.
Would you walk onto a highway an expect an 18 wheeler truck to drive around you? Or better yet, stand on a set of tracks and expect a train to go around you?
Islam is not going to go around you.
You don't think it's possible that someone born in that country could start to doubt the state religion on his or her own?
Contrary to what some people think you don't have to be taught how to not believe.