Why do we get console output if we don't call toString method?