Stellar formation

When interpreting a young stellar system's luminosity, why should astronomers consider both the protostar and surrounding material?