There are more causes than one to this problem. One issue is how the spawn protection works, which doesn't allow you to prepare a throw before the spawn protection ends. Another problem is that the gostek sometimes refuses to throw a grenade when close to a wall, collider or just a door made up of bullet colliding polygons.
In most versions in Soldat's history the grenades used to spawn slightly in front of the player and it could be used to throw grenades through very thin walls. The complaints against this were extremely exaggerated, considering that the kind of maps which had such thin walls always were exclusively played on realistic servers (Realistic/Survival) where you couldn't see the enemy through the wall. That kind of blind nade was well integrated with the gameplay and there wasn't really an issue. If choosing to mapmakers could easily and only with minor adjustments change walls so that a clean throw through it wouldn't have been possible. Still, I think this was the reason that made devs implement a failure to throw grenades when closely facing a wall.
Sadly the game doesn't seem to know the difference between a wall and something concisting of bullet colliding polygons or colliders, like a door you have to go through to enter a bunker on a trenchwar map. The ability to throw grenades while entering used to be an important move for anyone trying to take a bunker in both TW and TTW. This gives campers inside bunkers an unfair advantage as they can both shoot and throw grenades at their enemies before they can do anything but wave their arms in response.
As bullet colliding polygons and colliders are used in all kinds of maps I can also imagine that the same issue occurs in other game modes. It's definatly a bigger problem than whatever was the intention behind the failure to throw grenades.