Shocked staff – and a widow who had just registered her husband's death – saw a couple in the car park at Bailey House in Rotherham town centre.
A spokesman for the force said: "Officers from the town centre Safer Neighbourhood Team arrested a 36-year-old man from the local area on suspicion of outraging public decency.
"He has been bailed pending further inquiries.
"Officers have identified a female they would like to speak to in connection with this incident and are currently making inquiries to locate her."
A council spokesman said: "Staff are working in partnership with the police and the wardens service to deal with any anti-social behaviour identified in the Bailey House area.
"We are confident that we have everything in place to deal with stamping out negative behaviour."