Eckels is shot by Travis because he stepped on the butterfly and changed the future.
At the beginning of the story, Eckels asks a prophetic question.
"Does this safari guarantee I come back alive?"
Of course, they tell him they can’t. He is nervous about hunting dinosaurs, but they explain the process and he goes along. He is warned not to step off the path, but he accidentally kills a butterfly. Travis is very angry.
When they return to the present, Eckles finds out that the spelling on the sign has changed and a different person has been elected president. Since this man is supposed to be a tyrant, we get the idea that Eckels has messed up the future.
Eckels moans, wanting to know if he can go back to the past and fix his mistake. Travis says nothing, but answers with his gun.
He did not move. Eyes shut, he waited, shivering. He heard Travis breathe loud in the room; he heard Travis shift his rifle, click the safety catch, and raise the weapon.
Eckels is shot more in revenge than punishment, because there is nothing that can be done. Simply by killing a butterfly, he has altered the future significantly. It is a lesson in how actions can have widespread unintended unforeseeable consequences.