Answer is: they are named differently because they are alternate forms (isomers) of the monosaccharide, glucose.
An isomer of a molecule has the same number of atoms of each element (in this example, glucose, galactose and fructose have molecular formula C₆H₁₂O₆), but has a different arrangement of the atoms.
Difference between D-glucose and D-galactose is the orientation of the hydroxyl group (OH) at fourth carbon atom, at D-glucose -OH group is right and at D-galactose is left.
Difference between D-fructose and D-glucose is that first one is ketonic monosaccharide and second one is aldose (carbonyl group on the endmost carbon atom).