because void keyword in java tells the behaviour of java execution stack which is a completely empty stack at the end of void method execution (not returning a type). this yields a distinction between expressions and statements in java language. in contrary to java, in scala everything is expression thus always returns (or evaluates to) sth.
AnyVal: all primitive types + void (unit) AnyRef: all java ref (object) types + all scala ref types Any: AnyVal + AnyRef