For example, this ad https://www.youtube.com/watch?v=t0-pKS_zx5E is made by "LOTTO 6aus49", which is "LOTTO.de", which is "Toto-Lotto Niedersachsen GmbH", which is the lottery company of the state Lower Saxony.
To me this is as if the state would place TV ads for wine which a state-owned winery produces, like "Landesbetrieb Hessische Staatsweingüter" also known as "Hessische Staatsweingüter GmbH Kloster Eberbach".
And the lottery numbers are then presented in the prime time news in the publicly funded television.
Lotto and sports betting in its modern incarnation are very different.
Lotto was created so that people’s desire for gambling is diverted towards charity.
When I was a cashier the state owned lottery monopoly had a training session for us on how to operate the lottery machines, and it was really dystopian how most of the time was spent on encouraging us to make upsells with sales pitches and being happy about gambling.
https://de.wikipedia.org/wiki/Lotto#Verwendung_der_Einnahmen
50% for is the gamblers
23% is diverted towards the charity you mention.
16.7% is taxes
7.5% is commission
2.8% is for running the business
In other words, the "Aktion Mensch" gives around 1/4 to those in need.
* Correction, "Aktion Mensch" give close to 1/3 to those in need and less to gamblers (also 30%). But they keep more to themselves.