Why do some games allow offline Steam achievements?

Solution 1:

VALVe recently added the function so that it is possible to earn achievements in offline mode. They did not announce it, though, for some reason. One can only speculate about this.

The condition for this to work is that, while online, you have run the game once or viewed the details in your library. Otherwise Steam wouldn't "know" that there are achievements in the first place.

Source: http://forums.steampowered.com/forums/showthread.php?p=29035241

Also, note that achievements you earn do not register onto your Steam account until you connect back to the Steam service (have an internet connection) and are dated at the time of reconnection.

Solution 2:

There are three possibilities here:

  1. Some games show that you've gained an achievement while offline, but when you connect back online, you will not see that achievement in your stats page, so you really didn't get credit for the achievement.
  2. Some games store your achievement progress offline, and when you go online, it updates your profile and you get a whole bunch of achievements all at once.
  3. Some games do not allow offline achievements at all.

Whether or not one of the three happens depends entirely on the game and the developers in how closely they integrate with the steam achievements.