Mr Horsley said the matter may never have come to court if the mother of the 18-year-old had not read about it on her son's Facebook page and contacted police.
He said the consequences of Loader's error in judgment had been extreme, financially and emotionally.
"He has been severely punished already for what would otherwise have been considered private activities, which had absolutely nothing to do with his profession."
Loader, a former head of the business unit at Otumoetai College, resigned by mutual agreement with the school.
Judge Paul Geoghegan suggested it was a "no-brainer" that the male teenager should have also been charged.
The judge said Loader's offending had clearly been a "serious error of judgment" for a man who had been a teacher for 26 years and had an exemplary prior record.
"You have gone from holding a responsible teaching position to being in receipt of a sickness benefit and having serious financial difficulties and no reasonable prospects of future employment in your chosen profession."
Judge Geoghegan said the Prostitution Reform Act was designed to protect vulnerable young persons from sexual exploitation and, in some cases, protect the victims from themselves.
"One might have thought given your age you might have significantly appreciated that fact ... But I agree with Mr Horsley that your culpability is low and community work is the appropriate sentence."
Outside court Loader declined to comment to the Bay of Plenty Times Weekend.
Otumoetai College principal Dave Randell and the mother of the 16-year-old girl also declined to comment.
When Detective Sergeant Iain Chapman was asked why police decided not to charge the 18-year-old male, he said: "Because the 16- and 18-year-old naive young people were victims of Loader's offending in the eyes of police, but we have taken the judge's comments on board."
The Teachers' Council of New Zealand is also investigating the matter.