Why the fly?
Fruit fly biological processes - including things like mechanisms of genetic mutation - are similar to that of humans but much simpler. Fruit flies also only live maybe a couple months but they're very prolific, growing from an egg to an adult capable of fostering another generation in only a week to 10 days, and a female is able to lay around 500 eggs in her lifetime.
So if you want to see how things like the micro-gravity, high-radiation environment of space might affect humans over their entire life span, or even over the course of generations, then you can use humans, in which case it'll take a big, expensive rocket, quite a lot of supplies and life support, decades or centuries of time, and perhaps involve some awkward ethical questions if the test subjects get sick or for some other reason want out of the experiment before you're done with them. Or you can use fruit flies, which will give you several generations of data in a month or two for the price of a small rocket and a few bananas.