This is indeed an intentional mechanic. If a pokemon using rapid spin gets knocked out by Iron Barbs, Rocky Helmet or Rough Skin, it will not clear the hazards. The same applies for Knock Off which will not knock off the opponent's item if the user faints due to the affomentioned abilities / item.