Why is french spoken in Burkina Faso?

Burkina Faso used to be a French colony, so people there speak French as the official language, as well as Mòoré, Dioula. The country gained independence from France in 1960.