On recon planes the reason was so that the enemy wouldn't know they were unarmed and couldn't pick them out from the escorts.
In the air, the windows for the large apeture photo gear would be visible long before the armament, either real or bogus, was. Most likely the fake gunports were more of a psychological boost to the recon pilots than anything else. Also I believe almost all recon missions were flown unescorted, keeping a "low profile", minimizing radar return, etc. IIRC, this was true with most of the F-4 and F-5 missions flown.