For economical reasons.Rulers loved to have somebody who would take taxes for them,and that somebody were jews.When rulers face problems,they kicked out jews to proove that they would ge good guys now.It's not just that. Think of the times the Jews were being expelled over 109 times, because of the angry Gentiles who plainly hate them. The pogroms and expulsions have scarred European Jewry deeply.
Or,when they need money now,like that french King who murdered Templars for their moneys.
And,it helped Europe - thanks to that middle class had time to grow,and cities become powerfull enough to get rights.
When in Poland,who never kicked jews out,our middle class never was created,and cities,except Gdańsk,was poor and without rights.
But,Gdańsk kicked jews out....
P.S for those who do not knew history - german named polish city Gdańsk as danzig.