Yeah, this is very legal. Most states now have investigative branches which try to bust (if you will) doctors who over prescribe listed narcotics. Whether fair, right or wrong it is what it is. Some pharmacy's will not even fill certain listed medications regardless of who wrote them.
hate to admit it but i have a relative in the medical field who WAS busted for exactly this...overprescribing ...