Being an agency working with crime and trying to prosecute and prevent it, this operation could be seen as sort of an "undercover ops", which is a natural part of the business the FBI is made for, when you try to prosecute or prevent things from happening.
The FBI did the right thing by keeping the pedophile site Playpen online after hacking it.