Interesting that Tieri mentions it's based on the scene in "Murder by Death" where the Sam Spade analogue has much the same discussion with his Girl Friday (Who mentions his stack of muscle magazines) as if that excuses it. Aside from anything else the implication of that scene is that Sam Spade IS indeed gay. It also has the advantage of being from a Neil Simon comedy, though perhaps not his best one, so context was already in place.