Every ticket must have one name and surname on it, no matter how many passengers it covers. That person must be traveling on the ticket.
You're usually asked for some kind of photo anyway because of discounts, which a very significant percentage of train riders are entitled to.
I think this is because tickets must be both printable and verifiable offline in case the train gets into a spot with no connectivity when the inspector is inspecting tickets.