In every train in Germany, if the crew is changed, they will control your ticket. They say 'Personalwechsel' and control the tickets again.
You don't need a passport, visa, or whatever to buy a ticket and no train crew is controlling your passport. They are also NOT authorized to see your passport. If you don't have a valid ticket, they will ask for your passport for identification purposes. You don't have to show it. They will then call the police, which you then HAVE to show your passport.
The train crew only looks at the passport, if you used it online to buy a ticket, using the passport number as an identification number. So they check the online ticket and look at the passport number. But you can use other ways of checking for a correct online ticket (using your credit card number for example) and you can buy your ticket also offline.
It also does not matter for 505 million EU citizens. The police may control your passport. But that's it.
ALL 505 MILLION EU CITIZENS ARE ALLOWED TO TRAVEL AND WORK IN GERMANY WITHOUT VISUM.
Details: http://ec.europa.eu/social/main.jsp?catId=457&langId=en