In the example above, object is parsed as boolean, because if statement only works with boolean type. The same is true for any other type (number, string, function, ecc - they all will be parsed as boolean).
In case of subtraction things are different. You cannot subtract strings, so it makes more sense to parse everything as numbers, because subtraction is an arithmetical operation (meanwhile sum is also a concatenation). Same thing for multiplication and division.
PS. The reason behind this article is not to explain why "3"+2="32", but to show that there is more to programming than writing code (a reputable developer needs to learn/do research on why things happen instead of saying they are stupid).