One can argue that the Romulans violated the Neutral Zone first, back in "Balance of Terror," destroying several Starfleet outposts and killing numerous Federation citizens. And how was the Federation to know that the Romulans hadn't worked the kinks out of the cloaking device since. Again, was Starfleet supposed to just sit back and hope for the best? To their credit, Starfleet showed great restraint by not retaliating immediately after the attacks in "Balance of Terror." Slipping past the Neutral Zone to steal some dangerous new technology from a known threat strikes me as a relatively measured and prudent response. And don't forget, this was back in the sixties when spy stories were the rage. "Mission: Impossible" used to do this sort of thing every week!