SEO at least at one point was honest work. It generally involved ensuring that websites had a Google-friendly design and appropriate metadata so that it could be found via the right keywords. For example, for a place that made beer and wine in RandomVille and gives “wine tours”, you might have keywords including:
Beer brewer brewing randomville Arizoba distillery tourism hops wine tour vineyard drinking alcohol
For sites that had db-driven or forum-style content, it meant going from URI’s like
randomcatforum.com?cat=1&sub=22&post=9987
To something more like:
Randomcatforum.com/1-breeding/22-crossbreeds/9987-can_I_breed_my_maine_coon_with_a_skunk
This overall led to more legible search results when looking through one’s history as well.
At some point, it also helped push the adoption of SSL as a preferred protocol
Unfortunately, over time “SEO” has become less about making site results optimized and more about gaming search engines, either to gain clicks and ad impressions but also for spammy or scammy sites