GLP-1 will prevent you from eating so much, but it won't make you eat healthy. You can and likely will still fill yourself up on junk, and will deal with the risks associated with that. Albeit it won't be enough to make you fat, but that's only one slice of health.
Learning to control your diet solves both problems.
I'd also argue there's a lot of value in learning to not be dependent on medication to control your behavior, because it's not available in most situations.
You can't take an exercise pill.
You can't take a career success pill.
You can't take a "hard, but necessary conversation with my partner" pill.
Those all require you to consistently do things you at times don't want to do, just like avoiding junk food.
Learning to control your diet solves both problems.
I'd also argue there's a lot of value in learning to not be dependent on medication to control your behavior, because it's not available in most situations.
You can't take an exercise pill.
You can't take a career success pill.
You can't take a "hard, but necessary conversation with my partner" pill.
Those all require you to consistently do things you at times don't want to do, just like avoiding junk food.