Rabbi Abadi,

I was reading that historically, observant Jews would eat permitted food at non-Jewish inns and establishments, as discussed by the Taz (YD 91:2), Maharshal, and Rema.

My question is: If this was an accepted practice among observant Jews in earlier generations, why do many rabbis today prohibit eating even completely kosher food at a non-kosher restaurant?

Has something actually changed in Halacha, or are these restrictions based on later stringencies? More generally, if earlier generations permitted something, on what basis can later authorities prohibit it?