Passenger trains used to be ferried across the baltic sea when I was a kid, in fact they still ferry cargo trains over to Poland.

I think it's more about the state of the infrastructure, and the scope of the railway carrier, at least in this case with Sicily.

For example the railway ferries between Sweden and Denmark ended long before the bridge was built, in the 80s.