This actually is illegal in many countries as it is a violation of net neutrality.
I don’t remember what the current net neutrality status is in the United States but if the FCC is currently requiring net neutrality then things like zero rating would be illegal.