1) it wasnt all humans who were forbidden - it was a community of jews who were fishing on the day of the Sabbath.
2) All of them did not transgress. Rather, they split into 3 groups.
GROUP 1 - went fishing
GROUP 2 - let group 1 go fishing and didn't stop them.
Group 3 - tried to stop group 1 from fishing.
Group 1 was made up of a handful of people, and they were punished. We dont know what Allah did with group 2. Group 3 were saved from the punishment.
3) Allah is ever merciful. He says many times in the quran that if He was to punish people for the crimes they did, no one would be left on earth. Instead, Allah gives us time (to repent) and only on judgement day will judgement be made.
In the case of the Sabbath breakers, if was their mocking of Allah's command that caused the punishment, not the act of fishing itself.