Chlorination of methane proceeds via a free radical chain mechanism. The whole reaction takes place in the given three steps.
Step 1: Initiation:
The reaction begins with the homolytic cleavage of Cl – Cl bond as:

Step 2: Propagation:
In the second step, chlorine free radicals attack methane molecules and break down the C–H bond to generate methyl radicals as:

These methyl radicals react with other chlorine free radicals to form methyl chloride along with the liberation of a chlorine free radical.

Hence, methyl free radicals and chlorine free radicals set up a chain reaction. While HCl and CH3Cl are the major products formed, other higher halogenated compounds are also formed as:

Step 3: Termination:
Formation of ethane is a result of the termination of chain reactions taking place as a result of the consumption of reactants as:

Hence, by this process, ethane is obtained as a by-product of chlorination of methane.