Marriage of a 12 year old is legal under Islamic Sharia Law. It is believed that this is a way for parents to sell their daughters life and virginity for large sums of money. The parents just need to sign on the dotted line.
In this case, the Imam wanted the parents to keep the marriage quiet, because he didn’t want to get into trouble with the British authorities.
According to this story, a journalist went undercover to get this story and the Imam agreed to do the marriage ceremony of a12 year old girl.