we don't know how to make computers understand ambiguities, that is the problem. Yacc always selecting the first option isn't necessarily right nor how we would solve the problem, we choose the option that makes the most 'sense'.
Of course what is 'common sense'? Something that only comes about when you have a billion neurons doing your calculations perhaps.
Also if computers had human level understanding we wouldn't need Yacc rules at all; we can recognize from 100's of different languages just by looking at them, even partial code, despite all the ambiguity of putting all programming languages into one Yacc grammar.