Germany may be a country where this is common, but not the only one by a long way. And no, a German name does not tell the potential employer that your mother was a foreigner? https://us.experteer.com/magazine/should-you-put-a-photo-on-...
you have to keep in mind that germany has a strong fear of history repeating itself and has strong laws to prevent that. so any hint of xenophobia in the hiring process could be a PR or legal nightmare for a company.
if photos on the resume would be a problem in that regard, they'd have been outlawed already.
if i were to speculate for the real reason then it is whether the applicant looks presentable. german office culture is rather uptight. it is also likely that it started on the candidate side, and that people realized that including a picture would make them stand out more.