Why can't a hardware store sell glass for a door window by law?

I called to get a piece of glass cut for a friend’s window for his door that was cracked. The hardware company told me by law they are not allowed to sell glass for a door. Can someone tell me the reason behind this? Thanks for the replies.