Composting diseased plants sounds wonderfully efficient: the tomato plant gets sick, the garden removes it, and the compost pile turns the whole mess into something useful. Unfortunately, the compost pile does not automatically know which microbes are helpful and which ones came along for the ride. If the pile never reaches adequate temperatures throughout the material, some plant pathogens can survive and potentially return to the garden in unfinished compost.
That does not mean every sick leaf requires a dramatic trip to the landfill. It means the composting method matters, especially when the disease caused serious problems in a vegetable bed or involved a pathogen that can persist in plant debris or soil. A well-managed hot pile can reduce many pathogens, while a cool, neglected heap offers far less reassurance.