Exercise is not a substitute for the health aspects of eating (e.g. cholesterol, heart health, "feeling" good, etc.), absolutely. But losing weight is 100% calories in/calories out, and you can "outrun a bad diet" as they say provided you're physically able to exercise for long enough or at a high enough intensity. It's certainly much easier if you put the garbage food in the trash and eat reasonably, but it's not a prerequisite. A big caveat though is that if you're already 350 pounds, you almost certainly don't have the cardiovascular stamina to lift heavy weights in the morning and do a high intensity workout in the evening.
In my 20's I was completely sedentary, weighed nearly 200 pounds / 91kg at 5'9" / 175cm, and had basically no muscle mass. I could barely press an empty 45#/20kg barbell overhead. 8-9 months of high intensity workouts, without any dietary changes, and I was down 50# with a lot of strength gains. I absolutely could have lost the weight faster, and gotten stronger faster, if I stopped eating fast food multiple times a week, but at the end of the day if you're physically able to do the work it's not a necessity.
Thanks for the downvote, but that's not what a strawman is and not what I'm doing. I largely agree with them, and "outrun a bad diet" is an extremely common expression. You'll even see I said "as they say" - because it's not the person I'm replying to who I'm quoting.
In my 20's I was completely sedentary, weighed nearly 200 pounds / 91kg at 5'9" / 175cm, and had basically no muscle mass. I could barely press an empty 45#/20kg barbell overhead. 8-9 months of high intensity workouts, without any dietary changes, and I was down 50# with a lot of strength gains. I absolutely could have lost the weight faster, and gotten stronger faster, if I stopped eating fast food multiple times a week, but at the end of the day if you're physically able to do the work it's not a necessity.