In C, casting is routine. For example, you cast when you obtain a memory block from an allocator.
In C++, this is not the case. Casting should be considered an exception event.
C and C++ and typed languages. C++ has a number of stricter type checks. But what make C/C++ practical is that these protections can be overridden. However, when you override a type check, you the programmer take full responsibility for the conversion and its consequences.
In your example, you need a cast because your doing something possibly pointless, but definitely unsafe. You're storing the address of a variable in an int variable. These are two different things and only you know why you would want to do that, so you must override the language type system to force that assignment thru.