I think it's a deliberate choice of design.
Most people don't see them, but even on this forum we have users with 5+ groups (most are invisible to regular users), so showing each badge in full doesn't work well and the badges go out of the intended area very quickly.
A CSS class or data attribute could be used to switch the styling based on the number of (visible) badges a user has. But personally I like the default design even when there are only 2-3 badges.
If think that was referring to the user avatar on a post? Because the same styling is also used for discussion badges in the discussion list. There are usually not more than 2-3 badges on a discussion so there could be an opportunity for a different design.
Another option could also be to use the mobile styling on desktop (the badges are shown to the right of the username next to one another)