That particular job was probably run by John Dean without Nixon’s knowledge. Of course Nixon did try to cover it up.
From the Watergate tapes:
Nixon: “I just don’t (unintelligible) very bad, to have this fellow Hunt, ah, you know, ah, it’s, he, he knows too damn much and he was involved, we happen to know that. And that it gets out that the whole, this is all involved in the Cuban thing, that it’s a fiasco, and it’s going to make the FB, ah CIA look bad, it’s going to make Hunt look bad, and it’s likely to blow the whole, uh, Bay of Pigs thing which we think would be very unfortunate for CIA and for the country at this time, and for American foreign policy, and he just better tough it and lay it on them.”
3 of the “burglers” were Cuban Nationalists” who fought at the Bay of Pigs and they knew of secret and current CIA operations under consideration. Nixon was worried theyd spill what they knew if they were prosecuted. Remember, at that time, Cuba was still a very hott spot in the battle with the Soviets and expansion.