You should do the right thing because it is the right thing.
However, with speed limits your teacher framed the question incorrectly. There is not right or wrong to a speed limit. 35 miles an hour is no more right than 38 miles an hour. The real question is why do we obey a law when there is no clear right or wrong to it? In the case of the speed limit our right/wrong choice is to obey the law or not. (And while speed has no right or wrong unsafe driving absolutely does, which could be unsafe due to the speed.)