Short answer is, because Matz defined it so. This behavior is one of the very few things I don't like about Ruby. It even gets better:
a = b if a
=> nil
a
=> nil
Variable a
gets initialized to nil even though in theory a = b statement should under no circumstances be executed.