I believe weight loss should be sustainable. It shouldn’t come from any actions (or the ceasing of any actions) that you cannot continue for the rest of your life. If you can only lose weight by going to the gym, you will likely go back to your starting weight and possibly more, once you stop working out. The same goes for food. If you cut out certain foods so that you can lose weight, you will gain the weight back when you go back to eating those foods.