In both of these scenarios, they were written not to kill new PCs. Only in the very small % of times with horrible luck and tiny odds would that happen in eitehr case. Heck, the PCs aren't even forced to engage in either encounter if they don't want.
As it was mentioned above, the adventure heavily implies that the Pcs attack the dragon and fails to offer any guidance for the event that they don't.
Also, those fights being scripted to not kill PCs is part of the problem why they are so horrible.
A adventure should not contain scripted tutorial encounters just because WotC wants to highlight the work they have done.