While there are many comparatives and superlatives that are constructed from the adverb or adjective (fast, faster, fastest; clean, cleaner, cleanest; high, higher, highest; etc.) some just need to be learned. In this case, good and well both employ better and best as comparative and superlative.
This is just as confusing for English speakers learning languages such as French, where the comparatives and superlatives for good and well are quite distinct. But what is common is that neither language uses more good nor more well - both have specific words (better and best).
To compare the adjective good / bon* and well / bien* we see:
good - better - best
bon - meilleur - le meilleur
well - better - best
bien - mieux - le mieux
This likely originates from the German roots, where modern German uses besser and beste.
* and ignoring the gender/plural forms