No-one ever objected. In fact, most places seemed glad I was interested and thought it was a reasonable request. It was pretty common to be asked to wait until the second interview, though, as most places wouldn't be kitted up to do this without notice.
This is a great question for an engineer to ask. Being able to see if the code is smart (e.g. using shorthand instead of multiline logic), neat and documented is a great way to get a feel for how your potential future coworkers work. They've spent the last two to four hours grilling you and know you, how you code and how you solve problems pretty intimately -- why not get to know them better, too?
It takes about 15 minutes for me to satisfy myself if it's good, and how good.