My attitude is the diametric opposite.
Code samples need not be long to be useful. Any competent person should be able to sit down and in a couple of hours have a code sample that gives an idea what their coding level is. If you can't produce code on demand before you're hired, then why should anyone believe that you will be able to after you're hired?
Of course anyone who codes in their spare time will have code available on a moment's notice. But even if you don't, asking for you to produce a code sample is not an unreasonable imposition.