It really depends on what type of train you are on. A high-speed, reservation only train is far less likely to have thieves on board and makes very few stops. In Spain, the AVE also has a security screening process for ticketholders only, so the chance of theft is very small. But a local/regional train making lots of stops with lots of locals hoping on and off would suggest keeping a closer eye on one's luggage.
And I'd think the chance of accidental luggage removal would be a factor since so many bags look alike. Even if someone quickly noticed they grabbed the wrong bag, the train might be long gone.
If you are going to secure your bags to the racks, please use common sense and courtesy. People need to be able to move bags around and if yours is tied in place, it can make it hard to do so. So don't set it on top/front of another bag and then lock it, making it hard for the person to get their bag from underneath or behind.