AFAIK the illegal part of the kickback is when you're abusing your position to enrich yourself (the agent), when you have a duty to act in the best interests of the principal. You buying a widget, and then the manufacturer sending you a rebate (aka. a "kickback") isn't illegal because there's no conflict of interest. However, if you're in charge of buying widgets for a company, and the manufacturer is paying the rebate directly to you instead of the company[1], then it is illegal.
In the case of the drugs, it's fine because the person ultimately paying for the drugs is the insurance company, which also happens to be the entity receiving the "kickback".
[1] https://www.justice.gov/usao-ndca/pr/former-netflix-executiv...