The fungus causing the leaf spot on your tomatoes is not the same fungus that infects your crab apple tree. Most fungi that cause disease prefer only one type of plant. Apple scab is caused by the fungus Venturia inaequalis, while the leaf spot on tomato is caused by Septoria lycopersici.
Fungal problems develop when the conditions are right, such as when a fungal spore hits a susceptible plant during wet, humid weather. You can help prevent fungal infection by planting disease-resistant tomatoes and disease-resistant crab apple trees. It is also important to give the plants plenty of room for good air circulation. When watering plants, do not use overhead watering that keeps the leaves wet. Remove the diseased leaves and dispose of them, so the fungus doesn't survive in the soil to reinfect the plant the following year.