If 30% love math, and 30% are neutral about math, then the 40% that hate it could be the largest group, hence the majority. If so, then the headline might actually be brilliant.
EDIT: Or not. A “majority” means “more than half.” The word I was thinking of is “plurality.”
For the record, editors often write their own headlines to fit the available space, or to generate more traffic. Here’s how CNN reported this story (under the headline “The most unpopular school subject“): “Twice as many people said they hated math as said that about any other subject.”