Because the Arduino environment doesn't perfectly fit compilers originally designed for UNIX/desktop use. The SoftwareSerial library uses interrupts and the optimiser cannot tell if those interrupts are used or not. So it must compile them into the final object code.