Define "much much later"
It was known by the early 1990s that GLP-1 slowed stomach emptying, with a key study in 1993 demonstrating its effects on gastrointestinal functions like gastric emptying, leading to longer feelings of fullness, which is the central mechanism at work here. See, e.g., https://pubmed.ncbi.nlm.nih.gov/35635627/
It just took eons for someone to decide that therefore maybe it was worth thinking about for weight loss.
That part is due to lack of exec vision - the fact that weight loss was not commonly treated with drugs (amphetamines work, but ...) meant they never thought really that hard about it.
To be fair, that lackof vision is not unreasonable in the sense that they have both plenty of high value targets, and plenty of arrows to shoot at them. Most of the arrows miss of course, but that's okay.
There is not always tremendous incentive to try new targets until they start missing the target too much, or the value of existing targets drops.
They almost certainly give up on, or ignore/drop/whatever, a near infinite number of things that may have turned into life saving drugs, billion dollar blockbusters, you name it.
At least right now, that's how this kind of thing works, for better or worse.
However, this is quite separate from when x was discovered to be a y, as it is here.
FWIW - I'll offer another lack of vision in the same vein - by slowing stomach emptying significantly, GLP-1 also causes the same amount of alcohol to do significantly less damage, because it enters your small intestine in much smaller amounts and over a much longer period of time. So much so that is a very effective treatment for alcoholism because it both reduces alcohol craving, and causes significant amounts of alcohol to do less damage. See, e.g., newly published studies like https://pubmed.ncbi.nlm.nih.gov/37192005/ and https://jamanetwork.com/journals/jamapsychiatry/fullarticle/...
Again, this should have been somewhat obvious to study a long time ago, but it wasn't started until 2 years ago.
It also turns out to reduce drug cravings, which is more unexpected, but would have been discovered much earlier with better vision.