>>> best chess engines are still worse at analyzing openings than humans.
>> Is that actually the case, or perhaps humans try a lot of sub-optimal opening lines?
> Sub optimal from the perspective of the AI
There's no perspective involved: optimal play is perfect play, assuming the opponent also plays perfectly. If a move is sub-optimal for White that means White has a better move, no matter what the opponent plays.
Sure, in practice a non-perfect-player might do better playing a sub-optimal move A rather than a better move B, because they don't know how to continue after B or because their non-perfect opponent ends up replying even more sub-optimally to A.
But just because I can manage to pull a fool's mate on someone that doesn't make it an optimal opening. One could say I might be "optimizing" for fun or for time, but if you redefine optimality arbitrarily then the original claim might as well be "chess engines are worse than humans at analyzing openings because they play better than humans".
PS: I'm not claiming that chess engines are better or worse than humans. And, incidentally, playing an inferior move while hoping the opponent makes a mistake is bad even if it works, as it really hinders your progress.
Restricting yourself to perfect opponents is very silly firstly, because there are no perfect opponents because chess is unsolved. So right out of the gate our definition assumes the counterfactual for all chess games every played and is both inaccurate (does not describe actual chess) and impractical (cannot be implemented)
Secondly, if there were such an opponent (which is not at all clear there ever will be), there is no way within the rules of chess to detect whether or not we face it in a given game. Imperfect opponents are allowed to play chess, and assuming they are all perfect while a defensible strategy is merely one of several.
Thirdly, it leads to very counterintuitive results. Consider the case in which chess is solved and well-balanced (e.g. a perfect opponent P can force a draw). We modify P to create opponent NP. NP behaves as follows: if NP's opponent is consistent with P, NP will implement P (e.g. force a draw), if NP's opponent deviates from P, NP will lose (forefeit or make bad moves). Therefore everyone can beat NP except "optimal" algorithm P, which can only force a draw. So now we have an "optimal" algorithm with a 0 tournament rating.
In reality the whole "perfect opponent" thing is mostly a notational convenience for Zermelo's Theorem. Which is very interesting and useful if you are writing a proof, less interesting if you are trying to win a chess tournament. A more practical definition of "optimal" is something like "wins a lot of games".
And given that you want to become a better chess player, isn't it better to start learning the best lines from the start?
Sure, but the King's Gambit is just an opening, and you'd have to rely on lazy mistakes to guarantee a win 10 moves ahead that early in the game.
To the extent that an AI approaches perfect play more closely than a novice or masters from the 19th century, shouldn't we go learn from the AI?
One interpretation of Stockfish here is 'I don't think this is a very strong opening'. To the extent that it's correct, stronger players will not play that opening very much, so spending time to learn it seems potentially wasteful.
For perspective, Bobby Fischer created a version of chess which randomized the game because even in his day, he was annoyed that some players that he felt were far inferior at playing chess, could actually better memorize opening lines and enter the mid game with an advantage.
So the answer is that players very well have been learning from AI.
>To the extent that an AI approaches perfect play more closely than a novice or masters from the 19th century
AI has become better than even the top chess players of today.
For example, if chess is a win for white, you play black, and you have a halfway decent opponent, he will know what black's best defense looks like (that is: the one that takes him the most moves to win). Replaying that gives you zero chance of winning or drawing. Deviating from the beaten path cannot decrease that chance, and may increase it.
It is similar when chess, played optimally by both players, turns out to be a draw, and you want to win, but in that case, you may not want to give up your assurance of a draw, so you may play less weird moves. You still will want to play moves that lead to plays your opponent is weak at, though.