Is it a good habit for an amateur to always try to play the best move (according to his best calculation and knowledge)? Is it a good habit for an amateur to always try to play the best move (according to his best calculation), instead of sometimes purporsely play an inferior move hoping that his opponent does not know how to take advantage of it?

For example, this implies avoiding playing slightly inferior but playable lines such as the exchange variation of Ruy Lopez, the king's gambit, or (as black) the queen's gambit accepted, or setting up a trap which objectively is not the best move in a particular position, but when your opponent does not see through it, you gain some advantage.

I personally feel that purposefully playing an inferior move may be helpful with obtaining advantages (and therefore winning chances) in a particular game, but may not be the best strategy, if not harmful, to one's life-long learning process of chess

So, is it a good habit for an amateur to always try to play the best move?

This question is related. But my question is more about improving one's chess strength instead of winning a particular game.
This is a complicated question since chess is very complicated, and both board, and time, factors may be part of a decision.

Overall, yes, you should always play the best move probably 99% of the time. If there is a second alternative, but it is not much worse, and you think that your opponent might get caught up somehow, you can consider it. If it is genuinely just bad, then no, avoid it.

Recently, in a game, I was playing someone well below me, and I played a move that sacrificed two pawns, but I played it knowing it was incredibly dangerous, and that he did not have enough time to figure it out. Well, my reasoning was sound until the tournament director walked by, and realized that the increment was set wrong, and was going to add time. My opponent, graciously, offered a draw, which was accepted.

There is one more case that I can think of, and that is if you know the style of your opponent. Let's say he is known not to defend well, and you have the choice between a positional move, and an attacking, but maybe not sound, move. If you are a good attacker, then it might be worth it given his known weaknesses.

Those first openings that you listed are not really inferior, but rather, might not give as much opportunity for an opening advantage, especially the King's Gambit. That is mitigated at lower levels, where opening theory is not memorized as deeply. The QGA is a bit more dangerous as it, generally, does cede a definite slight plus to white.

So situational chess is a thing, but do not go overboard playing horrible moves that can bite you. Also, everything is out the window if you are significantly worse: In that case, do whatever you can to complicate the position, and make it tricky for your opponent.

As far as improving one's strength, and game-situation aside, yes, you should always try to find the best move.