Because of type erasure.
the compiler translates the generic and parameterized types by a technique called type erasure. Basically, the compiler elides all information related to type parameters and type arguments.
For instance, ArrayList<String> and ArrayList<Long> have the same raw type ArrayList after the type erasure.