For Starship, they have a remote voice link to the thing, and if someone is messing with it, central control can yell at them or send siren sounds. It locks remotely; people can't just open it easily. Someone could steal the whole thing, but its location is known and it has already sent video of people approaching it. Besides, stealing from it probably just yields a pizza, a Chinese dinner, or some random groceries.
Redwood City is a good test site for this, because it has both good and bad neighborhoods close together. They can find out how much people will bother it.
People will steal/vandalize it simply because it's strange and (probably) expensive itself, not only for the cargo.
For historic context see the early adoption woes of traffic and speed cameras.
A siren, cameras, and GPS feedback doesn't help against a molotov cocktail thrown with a mask, from around a corner, or high above; and lots of people don't like the idea of robots roaming the streets.
I haven't thought through the economics on these systems, but there are enough startups working on it for me to think it must be a larger market than I realize. I wonder what the overhead is (how many robots you need to meet demand), how quickly they can deliver, and what other limitations they have (temperature control, weather resistance, ability to traverse stairs/elevators).
At what point do these machines become cheaper than humans? I understand that they are likely meant to be a supplement as opposed to a replacement, but until they can compete with humans there's not much of a business.
Redwood City is a good test site for this, because it has both good and bad neighborhoods close together. They can find out how much people will bother it.