The pilot light may be a little low so that the thermocouple is only just hot enough to prevent the system from cutting out. When the pilot light is on on its own, the pressure will be slightly higher and the draft will be less, allowing the thermocouple to remain sufficiently hot.
When the main burner is on, the gas pressure will drop slightly and there may be an additional draft, which could cause a slight drop in the temperature at the thermocouple.
In time the thermocouple output may drop enough to cause the system to cut out completely. This would lead to both the main burner and pilot light being extinguished.
If this sounds like your problem, you could try increasing the strength of the pilot light flame by a small amount - there is a regulator somewhere in the main gas valve.
Dealing with gas is potentially lethal, so you should not attempt any repairs unless you have complete confidence in your capability.
Henry
October 2005