I've put a lot of thought into this, and I do believe it's more vital to the way Link grows as a character and the strength of the plot for link to visit the shadow temple first. Sheik tells Link to go to the Shadow temple and Kill Bongo-Bongo, because an evil has been released upon Kakariko Village, so Link must do this for others and not himself. The Spirit Temple on the other hand is more of a temple that was made purely for Link to conquer and overcome his inhibitions , since this is the only temple in the game which you must come back to as a child, as well as an adult, in order to fully complete the temple plot-wise. It seems to me fitting that this would be the final temple, since the whole game Link is destroying bosses in temple to help others, while the last temple really puts link to the test mentally and physically.