The Iglai Tal, in his hakdamah, asks this on those who opine that we also consider why a person is performing the melachah, and if he is doing an unnecessary action it will be considered a melachah she’eino tzericha legufa: When one forces another to do a melachah, the one performing the melachah does not want the melachah. He is only performing the melachah in order to save his life. In their opinion, this should be classified as a melachah she’eino tzericha legufa that is only a rabbinic prohibition. So why do we find that there is any discussion about this? If it is only a rabbinic prohibition, it should be obvious that it is permitted. It seems from here that even if one is performing an unnecessary melachah, it will be considered a regular melachah.