Unfortunately the widely-touted recommendation of spaying before the first season to drastically reduce the risk of mammary tumours does not have a strong evidence base - its something which has persisted in veterinary teaching despite little research or evidence. A systematic review of the data in 2012 found that
"One study found an association between neutering and a reduced risk of mammary tumours. Two studies found no evidence of an association. One reported “some protective effect” of neutering on the risk of mammary tumours, but no numbers were presented. Due to the limited evidence available and the risk of bias in the published results, the evidence that neutering reduces the risk of mammary neoplasia, and the evidence that age at neutering has an effect, are judged to be weak and are not a sound basis for firm recommendations."
onlinelibrary.wiley.com/doi/10.1111/j.1748-5827.2011.01220.x/abstract
Its unlikely to be detrimental in terms of mammary neoplasia to spay early, but the benefits may not be as strong as widely believed. Also for breeds with already high-risks of neoplasia, neutering can increase these risks, which can be significant depending on the breed and type of neoplasia (e.g. possibly osteosarcoma in rottweilers) but again this is an area of ongoing research.
There's increasing evidence of potential problems of early neutering in some breeds relating to cranial cruciate ligament rupture or patellar luxation and this is an area of ongoing research. It may be that neutering later once the dog is skeletally mature my confer some protection. Larger breeds may also be at increased risk of urinary incontinence if neutered before maturity.
There are also various behavioural considerations that should be weighed up
www.apbc.org.uk/system/files/private/summary_sheet_of_spaying_risks_and_benefits_bitch.pdf
Unfortunately most vets will not be up to date with a lot of these issues and will trot out the magical 'spay at 6 months' advice regardless of breed or gender (and yes I am a vet too!). Often its a case of carefully considering when to spay rather than whether to spay, and considering the age of sexual maturity and the prevalence of disease risks within the breed.