Yes, I was considering that. My reasoning is that the mages constructing it cut corners. "It's only going to last six rounds; why cast an extra spell to immunize it against magic, which a target may not have, when this is much cheaper?" All named golems may have insane spell immunities, but there are other constructs that don't. (Ex: Shield guardians)

Despite its lack of spell immunities, the Catalysts insist on calling it a golem. They say it confuses meddling adventurers. ("It's a golem! Quick, figure out which obscure spell might actually damage it!")

For those "special" targets, however, you can add spell immunity to a foam golem by adding Lesser Globe of Invulnerability to its cube's construction. If so, it is immune to any resistance-allowing spell or spell-like ability except:
-A magical attack that deals fire damage heals it, as described above.
-A Transmute Lava to Rock spell cast directly at it causes 8d10 points of damage and stops it from acting on its next turn.

Adding spell immunity to a foam golem bumps its golem cube's cost to 3700 gp + 200 xp.