According to the Valve Developer Wiki, func_tanktrain is supposed to be a func_tracktrain with the added capabilities of shooting at the player and being destroyed by taking damage. However, also according to the VDC, func_tanktrain has a bug that makes it impossible to damage or kill the entity. I am also unsure how the shooting mechanic works, as the entity has no related keyvalues, inputs, or outputs for this.
In short, tanktrain is a broken mess that doesn't belong in TF2 and was only included because of sloppiness.