Because the point of FizzBuzz is not to get a working FizzBuzz class that can be integrated into an application, it's to see if the candidate can actually produce a working version themselves.
Imagine you're hiring someone to do your taxes. Sure, you'd expect them to use a calculator to do all the hard addition/subtraction, or more likely spreadsheets. But if you asked them to add 5 and 3, and they said "I would use a calculator, this is a stupid question, I can't just tell you off the top of my head" then you're probably not going to hire them.
It's a super basic test of 'Can this person code themselves out a paper bag."