Oddly, I can't remember anyone ever asking me for my ID on the train - just the ticket. And if you purchase the ticket online, you can print it out either at home or at a kiosk with just the credit card or confirmation number.
> what they were asking was illegal.
Are you sure it is? They're a private company - on what basis is it illegal?