Bad luck.
There is quite a debate around the renewal of the lubricant in the reduction gear casing. Certainly here in Europe Nissan dealerships will often say it is sealed for life. Also the lubricant used is very specific and quite difficult to cross-reference.
Also dealerships seem to know little to nothing about Leafs. You'll want to see exactly what the service manual says they're supposed to have done, and check for any discrepancies.
So you'll want to find out if your dealer ever touched the reduction gearbox. Did they check levels, did they replace lube? You'll want to see the oil that comes out now (with whatever bits it had floating in it!). And you'll want to see the under car protection to check for lots of oil residue.
If they have intervened in the past (and this should be fully documented) you'll want to know exactly what they did down to the last fluid ounce of what lub went back in. If they haven't then you'll be wanting to know why... Although as mentioned by R1200RT (although I think that's a motorcycle) the most likely reason for absolute failure would be an empty casing, followed by possibly the wrong lubricant... Or, just plain old bad luck.
**** does happen, this car is 8 years old. Maintenance and check-ups are very diligent, but nothing stops stuff going wrong from time to time. This is a Nissan, not a space ship. Oh, they go wrong as well do they?!
Good luck, I suspect you're going to need it.