If you are just doing a job for example a soldier is just doing their duty, do they still have to suffer?

Absolutely. The soldier has a choice of whether to commit that negative consequence and by choosing to commit that action, they are creating conditions that will affect them negatively. Now, this is different from imminent danger. For example, if there is someone with a bomb who is about to kill hundreds of people and you kill that person you don’t suffer negative consequences. In this case, you actually saved hundreds of lives.