The LPG cooking gas contains propane and butane as the constituents. A

The LPG cooking gas contains propane and butane as the constituents. A sulfur containing compound is added to the LPG, because

it lowers the cost of production
it enhances the efficiency of LPG
it facilitates easy detection of leakage of the gas
it assists in liquefying hydrocarbons
This question was previously asked in
UPSC NDA-2 – 2016
The addition of a sulfur-containing compound to LPG cooking gas facilitates the easy detection of leakage.
LPG (Liquefied Petroleum Gas), which primarily consists of propane and butane, is naturally odorless. Leaked gas can accumulate and pose a significant fire and explosion hazard if not detected. To ensure safety, a strong-smelling substance, usually a volatile organic sulfur compound like ethyl mercaptan (ethanethiol), is added as an odorant. This allows even small leaks to be detected by smell, prompting corrective action before a dangerous concentration of gas builds up.
The amount of odorant added is very small, typically only a few parts per million, which is sufficient to make the gas detectable by the human nose at concentrations well below the flammability limit. The odorant does not affect the combustion properties or efficiency of the LPG.