I've witnessed how caught insects will spontaneously release eggs prior to death.  Even grass goes to seed if deprived of life sustaining water.  (I'm sure there's a name for this stress induced response but I dont know it.)  So my question is this:  How do we know if certain animals, take salmon, are spawning and then dying as part of a reproductive cyle or as a response to stress?
In other words, what if they dont swim upstream to lay eggs but lay eggs because they swam upstream and were stressed?  Either way it's clearly nature's perfection but I keep wondering how we know if the 'egg laying' of some creatures isnt the result of their impending death, not the other way around?  I hope you can answer!  Thanks :)

Only some salmon die after spawning, implying that it isn't a 'hardwired' part of the reproductive cycle, but is instead related to stress.  I dare say this is testable by looking at the fitness of those salmon that do die, but I haven't come across any such studies.