The "Prime Directive" is to prevent yourself from getting involed in affairs that might spiral out of control.I was not aware that moral cowardice was considered a virtue?
While some might call it "Moral Cowardice", others see it as a form of preventing good intentions from making a muck out of an existing situation.
e.g. (Admiral Mark Jameson: By 2319, he had reached the rank of commander, and was sent to negotiate the release of hostages from Mordan IV. Officially, he successfully negotiated their release. However, in truth he supplied weapons to Karnas, the hostage-taker, in return for their release, and falsified the official records. This was a violation of the Prime Directive, so Jameson made an attempt to even things up by also supplying weapons to Karnas' rivals, thus causing forty years of civil war, although he claimed that he had assumed that the resulting conflict would last for only a few years before it ended.)
While what Mark Jameson did was for the "Best of Intentions", he caused a forty year long civil war despite his original estimations of civil war lasting only a few years.
S31 is it's own loose cannon, you have no control over it, StarFleet doesn't either.I think DTI or S31 would go and try to change at least some things.
They are their own entity that operates in secret to do what they believe is best for the UFP / StarFleet.
DTI operates on the Temporal Prime Directive along with various other rules & regulations.
DTI has allowed certain Temporal Changes to stand, like Admiral Janeway's changing of time via going back to meet her younger self and helping her destroy the Borg Transwarp Network Hub.
As to why it was allowed to stand, please read Christopher L. Bennett's Book (Department of Temporal Investigations: Watching the Clock) for a very plausible answer.