You would be surprised under which conditions many of the basic food items you are eating daily are produced...
This is not that bad, actually.
The tomatoes are prepared with salt, as it seems (you can still see some salt crystals between them) and will dry relatively fast in the sun and hot wind of southern Italy.
Salt and water removal will quickly make the tomatoes a hostile environment for any kind of microbiological life.
Do they try to stop birds shitting on them or just get rid of the ones that do get shat on?
No, not AI.
Just perspective and a really narrow aperture setting while taking the picture, leading to an image that is sharp throughout.
These are halved tomatoes lying on grates to dry in the sun and hot wind.
Also: salt.
You can see some undissolved salt crystals lying there between the tomatoes.