On the other hand if you add some leeway you might end up with a captain trying to justify handing easily weaponized technology to a planet because he just happens to have taken a liking to someone there.
Given how horny Starfleet can be I fully expect there to be several civilizations that ended shortly after a captain found someone there to be bangable.