I have realised that Opening theory usually contains the highest quality chess, they have been pruned and honed. However sometimes when I am going through an opening with say Stockfish, I find that at times Stockfish has different recommendations than the opening has. So I have been wondering how does the quality of play in an opening compare with the abilities of a 3300 elo chess program?
There are at least four possibilities, all of which are pretty normal.
One, the opening theory is from a good, recent book. The author will have used the strongest engines himself, and also applied his own chess knowledge, and spent enough time to find better moves than the engine did.
Two, the author did see the computer move, but thought it was not practical for a human to play like that, and that his move was almost as good but much easier to understand, explain and play.
Three, the position is drawn (as most opening theory positions are) and in the final analysis both moves will turn out to be good enough.
Four, you've found a mistake in the book.
All of those happen all the time.
If you have a concrete example, you'll get much more concrete responses.
First off, we should understand how opening theory is developed, and a short answer is that it comes about through publications, either through analysis in books/articles/magazines, or tournament games (that are published).
Now, some openings are dubbed "non-theoretical", but in reality, all openings contain a body of opening theory, and what "non-theoretical" usually means is that the analysis in publications usually ends early (say by move 10). These openings, especially the obscure ones, are seldom played at GM level, and lack recent GM-level proponents, so the existing literature is either scarce or leaves much to be desired. In these cases, there are points of improvement certainly discoverable with engines. (Some of these do get played, but fail to impact theory because they are at a lower level and receive little attention, or are not published.)
On the other hand, the sharp, theoretical, and top-choice-for-GMs such as the Sicilian/KID/Gruenfeld are heavily studied and "analysed to death" in certain lines. It's difficult to find improvements through the analysis of a program that have not already been considered by the theorists. The biggest problem with engines in general is that they fail to understand long-term positional advantages, and this happens particularly often, for example, in exchange sacrifices in more quiet positions of the Sicilian (where black plays Rxc3, forcing white to recapture by bxc3) after which black plays against white's structural weaknesses (and the c4 square) are often underrated by engines as it takes looking at the position several dozen moves later (for a computer) to realise that these sacrifices may potentially be the best option. On another note, the analysis of sacrifices in open positions such as the Poisoned Pawn variation of the Najdorf (1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf3 5. Nc3 a6 6. Bg5 e6 7. f4 Qb6 8. Qd2 Qxb2 9. Rb1 Qa3) do well to be assisted by an engine, but it is noteworthy that it takes some time before the computer agrees with existing theory in many positions!
Another time when engines may be inferior to theory is the placement of pieces in closed positions, which computers are notoriously poor at playing. In these cases, the computer has difficulty differentiating on whether to put that bishop on e2 or d3, but it is often strategically clear to humans, and such positions can arise in the opening as well.
Nevertheless, it should be stressed that improvements in heavily theoretical positions do exist, and are often found with the assistance of computers (which is how modern theory advances in today's age), but don't expect these to come by easily!
What I've noticed with Stockfish is that a lot of the recommended moves they suggest depend on the options you have selected. For instance if you have selected Stockfish's play style as aggressive or suicidal vs. passive or solid it is going to recommend different different openings. Also selecting the book variety as low medium or high will change what Stockfish recommends.