Please help me understand this use of 去做
去 means 'go'. It can function as a verb particle that denotes the initiation of a verb. Similar to 'go' in 'go kill people' in English
More examples:
我當教師 = I being a teacher
我去當教師 = I go and (begin to) be a teacher
因窮而犯法 = break the law because you are poor
因窮而去犯法 = go and (start to) break the law because you are poor

很多时候，我们不得不做一些自己不愿意做 = We often do something we don't want to do


很多时候，我们不得不(去)做一些自己不愿意做 = We often (go/ start) doing something we don't want to do

A simpler example:
殺人 = kill people
去殺人 = go kill people (initiate the action 'kill')