You most likely have forgotten to apply modifiers to sneaking and hiding. Consider your example of Wood Elves in trees. The Elves should have proficiency bonus to stealth, and a bonus from dexterity as well, giving them roughly +6 to their stealth rolls.
Furthermore, they are hiding in trees, and hence are protected by foliage which either blocks sight completely (in which case they don't need to make a stealth check to be hidden if they are silent, as they are heavily obscured) or if the foliage is light enough to obscure but not block sight completely, it grants Disadvantage on active perception checks or a −5 to opponents' passive perception checks (see Hiding, Player's Handbook, page 177).
These two modifiers alone are enough to make a Wood Elf hiding in a tree completely invisible to the "Average Joe's" 10 passive perception, and very likely to beat even above average ones. Remember that a natural 1 is not an automatic fail for ability checks.
Another mistake you're making is assuming that all creatures of an ambush need to make a hiding check. Creatures that are completely obscured and silent (eg. behind walls) don't, and this is critical for the larger ambushes you mentioned. As long as there are enough hiding places or dark spots to completely conceal the bulk of the ambushers, it is enough for a few observers to remain in more visible spots where stealth checks are necessary to stay hidden. The rest can remain in positions where they don't necessary have a line-of-sight against their enemies, but can be alerted to spring into action by the observers.
In addition to what I pointed above, this could be considered a group check - at the GM's discretion. With a group check, at least half of the Wood Elves would need to succeed at their checks, which would significantly improve their chances of success.