You are doing nothing wrong. I get that here in Miami about every other time I ride my bike.
I've come to realise that there is a large group of drivers that just hate bicyclists. They know what the law is, but don't care, and just believe tha bicycles shouldn't be on the road.
About the only thing you can do is just ride so they can't hurt you, which for me usually means taking the lane so they have to make a wide pass, so that even if they buzz you (which they will), you at least have room to your right to be able to avoid them.
__________________
Il faut de l'audace, encore de l'audace, toujours de l'audace
1980 3Rensho-- 1975 Raleigh Sprite 3spd
1990s Raleigh M20 MTB--2007 Windsor Hour (track)
1988 Ducati 750 F1