If a company thinks they can make money by paying a merchandizing fee to Hasbro for the use of their logos and branding and then putting said logo and branding on whatever it is they make, they're going to do it. Hasbro might get a few bucks for the process, but the real money is made by the boxer-brief company who can now sell their product at a higher price because it has the D&D branding on it. And it's not even that weird... almost every single product has some sort of branding on it. A cereal company and a vitamin company both pay the Flintsones people for the use of their branding. Disney lets diaper companies throw their brands on baby diapers... so Disney is letting toddlers literally sh*t on their brands.
That's the thing about stuff like this... Hasbro doesn't have to do anything-- they just cash the check after sending the company a few picture files of acceptable images. Heck... every single person on DMs Guild is basically like this boxer-brief company too-- use the D&D material and images in your product and when it sells, pay Hasbro (and OneBookshelf) a fee for their use.