It is not a rarity. Here is an article. http://www.today.com/id/39832592/ns...ies-ban-teens-trick-or-treating/#.UkLNf-e9KSM
Really, that is the stupidest law you have heard of? It specifically addresses the top complaint of the people in this thread, so there are probably people who would be glad if they had a similar law in their town or city. If you want to see some real stupid laws there is a website called stupid laws.com.
I say in all seriousness that it is the stupidest 21st century law I have ever heard of. (Obviously, something like the 3/5ths compromise is stupider.) Even stupider than telling people what color they can paint their mailboxes.
Also, I checked out that stupid laws site. Tons of them have been debunked by Snopes, either for having been abolished centuries ago or for never having existed in the first place.

