Amazon has an interest in allowing these resellers of legitimate products to exist because it pushes down prices from the primary vendors, lowering prices for the customer. The primary vendors end up competing against themselves indirectly but they have no one to blame but themselves. This is the milieu in which counterfeit products exist.
If the producers of these products were consistently competent at managing their supply chains it would be much less of an issue because it would clear the field of resellers arbitraging the mismanagement, leaving only Company X and the counterfeiters which is a much easier problem to solve because you don’t have to worry about banning legitimate resellers. But that isn’t where we are.