system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why can't the federation use cloaking technology in Star Trek?

I know they have signed some sort of treaty w/ the Romulans but why would they agree to that? isn't that just shooting themselves in the foot?
gpt
In-story, they signed the original treaty when they were nowhere close to having a working cloaking device. So they were effectively giving up nothing; in return, the Romulans agreed to leave them alone.

In reality, cloaking devices are kinda deceptive, so the TNG writers didn't think they fit in with the vision of the Federation they were presenting. They had to come up with some kind of excuse for why the Federation didn't use obvious tactical advantages.