Empire Strikes Back and Attack of the Clones were also the lowest grossing in their respective trilogies. And A New Hope and The Phantom Menace were the highest grossing.
Not to take a shot at one of my two favorite Bore mods but*.... A New Hope and Phantom Menace both got multiple wide theatrical re-releases that are counted in their domestic totals. The only wide re-releases for ESB and ROTJ were the Special Edition, and for ATOC and ROTS haven't had any. (They both did the short IMAX tour with TPM.)
Purely on their domestic first runs, ANH and ROTJ are pretty much even except for the horrendous inflation in the dollar between the two. And that's with the insane fact that ANH's first distribution run didn't leave theaters until early 1978. At which point they re-released it three months later. Almost 10% of TPM's domestic total is from the 3D re-release.
*I actually bring this up less because of the INEXACTNESS OF YOUR FIGURES but because of the strange situation where Star Wars has always been incredibly unique in that unlike almost every other franchise since the dawn of the modern blockbuster, it's never had been one that left theaters after blowing its initial wad. Fox and others continued to plug holes in their schedules by putting it back in theaters. In fact, that whole thing we mentioned before about how Fox held the distribution rights to A New Hope still, it's partly because for about five years or so every time Fox had a failed film they yanked from theaters, they sent ANH back out to replace it.
I don't recall Lucas' role in this, but it was arguably partially ideal for building the franchise as a whole by having the film available for people to see regularly again every year. The mass market couldn't rent it, or tape it or anything until roughly after ROTJ's release. So other than TV airings, it rolling back into theaters multiple times a year helped prop up the nascent Lucas licensing empire.
Theaters probably didn't mind having Star Wars back around for parents to dump the kids into either.
Amusingly, the other company best known for re-releasing the same films over and over again into theaters for decades (not to mention their fake supply constraint situation of the home video releases, something that was also done to Star Wars) is of course, Disney.