Bees are attracted to sweet scents that remind them of nectar. Syrups, fruits and fruit juice are common things that will attract bees to your trash cans. Bees are constantly searching for nectar to take back to their hives as a food source for the queen and other bees in the nests. Simple precautions can be taken in order to keep the bees at bay.
Put on the thick clothes, gloves and face protection. Make sure the clothing is thick enough to protect against any bee stings sustained as you go through your trash and kill the surrounding bees.
Place a dome lid on your trash can.
Spray any surrounding bees with household cleaners to kill them before attempting to open and empty your trash can.