It tests whether you can write a simple loop with a couple of ifs - not being able to do it is definitely an indicator that you won't be able to complete more advanced programming tasks. And pretty much any other programming task is more advanced.
Before you do a technical interview, you send them a website and ask them to write that FizzBuzz equivalent for you, or if you want to be seen to be nice, schedule a 30 minute interview with them and ask the FizzBuzz thing.
It doesn't have to be asked during the full technical interview stage.