What happened to gasoline in the mid 1970s?

I rember buying 104 octane leaded at unocal (union 76) post 1980.

What I don't get is if a high compression engine can produce more HP per gallon why did we go to lower octane gas?

It seems like higher compression and higher octane wound be more efficient and that trans lated to more mpg