Just fwiw, my wife and I raise, train and show dogs fwiw. My wife also works professionally as a trainer as a side-line.
The problem of dogs and bikes is a tough one. Mostly because it ain't your dog...
Remember that many breeds have a strong prey drive -- i.e., they like to chase things that are moving. So when you ride by or run like hell their little canine brain goes "COOL! Let's GOOOOOOO" and you're off to the races. A pretty common way to teach a recall (calling the dog to you) is to start by calling their name, giving the command, then turning and running away. You kick in their natural instinct to chase and once they come in close you give them a treat/praise/whatever. So when you're biking past or running by a dog it is at a minimum a big game. For more aggressive dogs it might kick in a true prey instinct -- i.e., must kill the thing running away.
Another aspect is what is called territorial aggression -- i.e., you've invaded their space. That's why dogs don't like the mailman, delivery people, etc. They hear/see them often enough to realize "that jerk keeps coming back and crossing into my territory! I must bit them...". Same happens if the dog sees you on the bike periodically. Not only are you fun to chase but you're an invader too.
Frankly the best "aiki" thing to do IMHO is to call the local animal control and file a complaint about a loose, aggressive dog. If not them try to police. That's the proactive thing to do. The owners are taking a huge risk at a major lawsuit if someone gets hurt -- imagine a little kid riding by on his bike? Aggressive dogs shouldn't be out in public. Simple as that. And owners have a responsibility to control their animals. I have a female australian shepherd who became very dog aggressive after our daughter was born. Some weird maternal thing kicked in and she decided any other dog near my wife or the kid must be a major threat. We tried to train it out of her but in the end we decided it was better to simply not let her get near other dogs. Safer.