Unless you own 100% of a company, it isn't really ethical to give yourself a discount or freebies. And wouldn't be legal unless handled correctly with the tax man.
You probably didn't arbitrarily give that to yourself. If the company decides to give employees discounts for some reason, like staff retention, that's quite different from just picking up whatever you like from the warehouse and walking home with it.