Why puducherry consist of four districts?

They were four French colonies, Pondicherry, Karikal, Mahe and Yanaon. They were organised as the Union Territory of Pondicherry after merging into India