Of course it can happen. I got a bogus 18-200 Nikkor from KEH and shortly afterward a Tokina 12-24 that had obviously been dropped before it got put into the UPS box at B&H. In both cases I ended up getting the lenses serviced rather than exchanged because I registered them before I knew there was a problem. Now I test. After my G3 experience with Panasonic Service, I'm putting cameras through rigorous testing before I register them, too. Much easier to exchange defective equipment, most of the time, than to get it repaired (though I sure wish manufacturers were better with QC--these days it seems like an unusually high percentage of the stuff I buy new is defective in some way).
My sister and I have a standing joke about that with me and computers....It usually takes me three tries to get one that works right

....With my last two desktops, it took that, and for at least two of my past laptops it has also (although my current laptop, a small Samsung, was fine out of the box)....
With cameras and lenses I think there is a fair bit of sample to sample variation. The EPL1 and G2 I had were fine from day one, but the first GH2 I had, over the first week I used it, started to not focus where the focus point was aimed, no matter what lens I used. Panasonic exchanged that, and the replacement focused perfectly but had really bad AWB, which I did not realize until I sold it some months later and then got another one (don't ask), which now both focuses correctly AND has good color.....
The GF3 I have was perfect out of the box, but a G3 I tried before that had a terrible copy of the kit lens, so I had to return the whole thing.....
My first copy of the 100-300 lens was just a little too fuzzy at the long end, so B&H exchanged it. The one I have now is fine.
All the Oly lenses I have had have been very good, except for a refurb copy of the 9-18 which I bought then returned because the mount was warped (I didn't bother to get another copy of that one)....but it was a refurb already, so I expected it to maybe have a problem.
These are complex mechanical, electronic, and optical devices, so there are lots of places where things can go wrong, and I actually expect problems....so I also spend some time evaluating them during the return period, so I can return them if necessary.
Usually, if things are working and stay working for the first couple of weeks, they are ok for the long run. When electronics fail due to manufacturing or QC issues, it tends to be early, or DOA kind of stuff. If get a good one, you are usually good to go for a while afterwards.
-J