Releasing a game's source code allows it to be read, forked, and modded. It increases enthusiasm for the game/franchise.

What do games studios gain by not making source code for old games (when available) public?

The example I had in mind was Westwood who haven't released Red Alert 2 source code. (but the same question applies to any game studio / game).

Doom's source code was released and it had an vast impact on modding and enthusiasm for the game and its creators.

Why isn't it more common for studios to release source code for old games?