Because of distance.
The Sun is an estimated 1,000,000 Miles away.
Astrophysics measurements are sort of complicated because you have space/time/distance and radial locale to observe and account for.
The Black Hole photo isn't even from Andromeda, which is the nearest Galaxy over, it's from Messier 87, which is further away.
The reason why it has to be further away is because of similar issues to trying to photograph something like Sagittarius A* at the center of the Milky Way, or trying to determine what's at the core of the Earth: These are things we have trouble with because we're too close to make proper determinations.
If we tried to photograph Sag A*, it'd just be a black photo, because we're too close. Similarly, we can't measure the Earth's core correctly, because we're ON Earth.
It's also plausible that we just simply don't have the technological advancement yet to properly prove what is definitively at the core of rocky planets. That could be another one of those situations where the math is there, the logic is there, but the technological advancement and equipment hasn't caught up to it quite yet.