It would work if list was a List<Number>. Because Integer extends Number, you can add an Integer to a List<Number>.
But list isn't a List<Number>. It is a List<? extends Number>, meaning a list of some unknown type. At runtime, it could refer to a List<Byte>. I hope you agree that adding an Integer to a List<Byte> is a bad idea.
A feeble attempt to tell you about our stuff that makes us money
Gift giving made easy with the permaculture playing cards