For one thing, the burglars were EX CIA & FBI; one (McCord, former FBI) was working for the RNC, and Liddy (former FBI) was working for CRe-EP. The other two were ex CIA (Hunt & Bernard can't remember). They knew about covert activities and what to look for but weren't acting on behalf of either government organization.
The prostitution thing was something Liddy had suggested for the Democrat Convention in '72 in Miami. He'd wanted to lure Dems onto a boat full of ladies of the evening, then catch them. He got the idea from the Dems, but the break-in had nothing to do with prostitution (on either side).
OK, Then explain why the Cuban burglars were carrying bogus passports that were identified as coming from the CIA