I guess it depends on the line; I was on a train Lecco to Milan and the station was closed and my friends told me to get on the train and buy the ticket; I was not the only one doing so. Perhaps it is Trenord versus Trenitalia but I go Milan Lecco from time to time and I see people purchasing from the conductor.