In the comics
In the Star Fox (Nintendo Power comic) the whale's backstory is explained. It is a "transdimensional manifestation of a staship" which had rescued James McCloud from the Black Hole, and thenceforth he helped them understand the primary universe. When the Star Fox team liberates the Stringrays from their controlling antennas, the whale appears through the black hole's warp field to save the Lylat System and leaves fuel canisters for the team's Arwings. Then Fox Sr. informed the team that Andross was to be found on Fortuna.