Say you know there is a car on your tail.. You're traveling 5 mph? 10? Say the dog is further out, too close to stop but you can swerve. Damage your car? Risk not breaking in time to go in a ditch? Lots and lots of possibilities other than '20 ft out, slam brakes or not.'
the only value judgement that matters is AVOIDING the accident.
Again, if there were always an option that resulted in no harm, or potential for harm, there would be no problem.
Notice you have to keep digging into the silly hypothetical territory. Thus proving my point. If a car is on your tail defensive driving teaches to change lanes, or worst case scenario get off the road and let them pass. Very low speed means you have plenty of time to stop. If the dog isn’t further enough out for you to stop then it’s still not further out enough for you to look around and start making value judgements on what you’d rather hit.
Part of defensive driving teaching is that if you’ve found yourself in a trolley you already screwed up. The vast majority of accidents wouldn’t happen if the drivers were looking further and keeping an escape path. So in the end there are always options, you just missed a bunch by driving wrong. Because reality isn’t like philosophical discussions.