Someone linked an article below pointing this is an oversimplification, but yes, importing produce from another continent (e.g. California when Spain has better climate for that) tends to be bad.
That's curious... ocean shipping is so massive and scaled so large, I'd guess its cheaper per item than, for instance, your drive to the grocery store to pick up that item.