I assume if the vignette was about defending second amendment rights, or some calculation about number of abortions, it would be equally off-topic from the perspective of the state, but the left wing media would be jumping on how a publisher tried inserting right wing material into their textbook. Just because the NYT agrees with the politics, doesn't make the material ok for use in a math text. It's not about censoring it, it's about not sneaking any kind of politics into a math book.