Question: Why was the wall between the Church and the State built?
In Europe, it never has been formally.
However, Europe was the melting pot for the “Reformation”, which produced the many “Protestant” (ie protesting) groups, who were trying to stop the corrupt influences between State and Church!
The Roman Church had grown into a massively powerful organization, which even had the power of life and death over its members at one stage!
The Eastern Orthodox Church had broken away from Rome in approx. 11–12 century in Constantinople, as its teachings became unacceptable.
The (apparently) most successful separation was in America after the Pilgrim Fathers established their domicile there. But as always, it needs constant vigilance!