It can actually be done either way: by insulating the rafters or by insulting the attic floor.
The original poster's setup is both wrong and counterproductive for New York state, since the rafters are insulated yet the space is ventilated. That's sort of like installing high efficiency replacement windows to save energy, then leaving them open all winter.
The idea of insulating the attic by insulating the rafters and gable end walls with no ventilation is that the attic then, becomes a conditioned space, just like the rest of the house. Warm air from below heats the area typically above freezing which would be the best option when plumbing supplies are installed in an attic.
If one were to ventilate the attic in New York, then there must be at least R-49 insulation in the attic floor and the pipes kept from freezing, and akin to running the water supplies in an outside wall.
By insulating the rafters, it is akin to running water supply pipes in an interior wall where the space is conditioned.
Plumbing codes in this regard are region specific and are based on the mean winter temperatures and degree heating days established by the state's building code.
Pipes run through attics in Florida can be done with only moderate concern for pipe insulation.
In New York State, with a mean January temperature of between -10F (Adirondacks)and +20 degrees F(Long Island), pipe freezing in an attic is a serious concern and it is rare to see plumbing run into unconditioned attic spaces.
Unvented attics and unvented underfloor spaces are also more energy efficient than conventional vented crawlspaces and attics. And although one actually ends up 'heating' these areas in winter, it actually ends up using less less energy to heat the house overall once the area has reached a maintenance temperature.