I don’t know the circumstances here or the stats, but what if that generalizing statement is true?
Some of the stats she shared at the time were from this bild article, which says that in 2018 there were 659 gang rape cases with 6% of suspects being Afghans vs Afghans representing 0.3% of Germany's population.
It looks like her original post has been taken down, but she recently tried to justify herself saying that as Afghans were disproportionately represented as perpetrators of gang rape (even though the data only refers to suspects), it was "statistically likely" there would have been gang rapists among the group of 200 refugees and their families that the Hamburg mayor wanted to bring over in 2021.
That is an insane and dangerous claim to make about a group of people based on nothing but historical data (and an obvious political agenda), and this is what she was punished for. It was not for simply "posting statistics" as the troglodytes on twitter have suggested.
Buy on AliExpress.com