I think this is a really interesting topic because there's a surprising amount of consideration that needs to go into something like this. Most people think "oh, a trashcan, how hard can it be to design one?".
Here's a list of the requirements of these trashcans, mostly taken from here (https://www.sfchronicle.com/sf/article/san-francisco-trash-c...):
- Durable: they can't be easily damaged due to physical force, rain, UV exposure, or even fire (if someone throws out a lit cigarette). These cans are expected to last 15-20 years
- They also shouldn't be easy to tip over
- They must be difficult for people and animals to get into
- They must be easy for public works to empty. The inner can can't be too heavy or not robust enough to contain the trash (32 gallons)
- The opening can't be too big to prevent people dumping large items into it
- These cans will also indicate when they're full via optical sensor (https://www.mercurynews.com/2019/02/27/san-franciscos-trash-...)
- They should look somewhat appealing (they're designed in Oakland).
- They must meet certain size restrictions due to the various widths of sidewalks in SF
- It must also have a recycling container on top that meets most of the above requirements of "people can't reach inside here"
In terms of "why are they so expensive": these cans are one-off prototypes. When they're mass produced, they will only be a bit more than the existing green cans ($1,218 vs $2,000) but with the goal of being much more durable and robust. Additionally, they're much less expensive than the "Bigbelly" cans that the city supervisors wanted to use. Fun fact: the city doesn't actually own those cans and they cost $3,000 per year to lease (!!!).