That's a great question I've wondered about myself while walking around the city! The answer isn't a simple yes or no—it really depends on the specific trash can.
In my experience, most public street bins you see on sidewalks actually have permanent, built-in plastic liners or bags. These are maintained by city sanitation crews who remove the full inner bag and replace it with a new one. So for those, you don't need to provide your own bag; you can just toss your item directly in.
However, some smaller or older bins, particularly in parks or less-maintained areas, might not have a liner. You might see debris stuck directly to the can. For these, using your own bag for messy waste is considerate, but not always required.
The bigger distinction is for residential or business use. Large wheeled carts provided by waste companies almost always require you to use your own bags to contain the waste, as the truck's mechanical arm lifts and empties the entire contents. Apartment building dumpsters also typically rely on bagged waste.
A good rule of thumb? Look before you toss. If you see a clean plastic liner, go ahead. If the bin looks bare, using a bag for your coffee cup or lunch leftovers is a kind gesture for the workers who clean it. When in doubt, securing your waste in any bag helps prevent litter from blowing away, which is always a win for the city.