Dave and vandrabrud,
the rules about who needs to wear which type of mask are complex, because there are different rules for passengers and employees, and different rules on different types of transport, and the rules vary by Bundesland (the last isn't relevant for your stories as you were both in Bavaria, but the other two explain the many of the discrepancies you saw). Here, for those who want to test their legal German, is an excerpt from the latest set of rules from Bayern enacted at the end of May (translation into English from DeepL).
In principle, you can never go wrong with an FFP2, but can run into problems with a surgical mask in some settings.
Weiterhin strenge FFP2-Maskenpflicht gilt in Bayern im öffentlichen
Personennahverkehr für Reisende. Für die Beschäftigten dort gilt die
Pflicht zum Tragen einer medizinischen Gesichtsmaske im Rahmen der
arbeitsschutzrechtlichen Bestimmungen. (Im öffentlichen
Personenfernverkehr gilt für Reisende wie Beschäftigte die Pflicht zum
Tragen einer FFP2-Maske oder medizinischen Maske bundesrechtlich nach
§ 28b IfSG).
Strict FFP2 mask obligation continues to apply in Bavaria in local
public transport for travelers. For employees there, the obligation to
wear a medical face mask applies within the framework of occupational
health and safety regulations. (In long-distance public transport, the
obligation to wear an FFP2 mask or medical mask applies to both
travelers and employees under federal law in accordance with Section
28b IfSG).