Because the "unlosable" election was lost by the Opposition offering Matthew Guy as the alternative (again). Matthew Guy had already lead the Coaltion to its worst loss in Victorian political history against Dan Andrews at the previous election. You know what they say about people that repeating their mistakes, expecting a different result?
If they had selected ANYONE else, Dan would've almost certainly been shown the door.