It's defined by certain entities in the map.
Like, if it's a bomb defuse map, you add a func_bomb_target to enable that game mode (Terrorists recieve C4, etc.)
Same with as_oilrig, once a func_vip_safetyzone is placed in the map, the teams are restricted of buying some of the weapons.
You couldn't really implement this in a non-as_ map, though, since with the safetyzone in the level - one of the CTs would always spawn as the VIP.