I think that's an exaggeration; 50 or so lines of code is not like any of those things. Maybe it's like a chef being asked to prepare an omelette. (But without all the in-person interview pressure.)
I think this practice emphasizes merit rather than what university you went to, what company you worked at, or even how you appear.
Plus, they're generally offered in the spirit of fun. Programmers I know seem to like them. People speak favorably about ITA's relatively difficult ones: <http://www.itasoftware.com/careers/puzzle_archive.html?catid=39>
Probably far better than those controversial Microsoft puzzles, where they'd actually ask you questions /during/ the physical interviews like, "Why are manhole covers round?"
> I can see providing my portfolio to an employers, but interview gimmicks
> like you describe is a clear warning bell for me that I'm not going to
> be treated professionally when I'm actually working for the employer.
Perhaps we have different ideas of professionalism in the tech sector. I think the book _Peopleware_ discusses the matter best, from a managerial standpoint, with the part on "Popcorn isn't professional!"
Tayssir