You handled the situation perfectly.
Congrats, you belong to the good, vanishingly small minority who does.
You see, from my experience I would estimate the fraction of car drivers who obey the rules when overtaking bikes at about a single percent. At most. The vast majority of motorists seem to think that they have the right to overtake a bike even when there is oncoming traffic. And they think that bikes have no business riding further left than to allow being overtaking with about a foot distance between car and bike. If the bike is too far left from their point of view, a significant fraction of motorists will start honking, or shouting, or swearing.
This is the culture that we bikers have to cope with. And again, a sizable fraction of bikers believes that the view of these motorists is correct. They think they don't have a right to sufficient lateral safety distances. They think they are required to squeeze right next to parked cars, and to risk riding into opening doors and such, just to make it possible for cars to overtake them even when there is oncoming traffic. They will not question or ignore the honking of cars when they are "too far left", they will obediently move more to the right and feel sorry that they were "in the way" of the car.
I see that myself when I'm driving a car, and following a bike the way I'm supposed to do until I have enough clear space on the other side of the road to overtake safely. The normal reaction by the biker is that they are completely baffled by the situation. They are not used to a car following them, and not trying to overtake immediately at any cost. They may even perceive the following car as a threat, because it's just so uncommon that they think something must be very wrong.
This is what you've seen: A biker who a) did not know his rights, b) expected to be treated like being nonexistent, and c) who was feeling insecure due to not being ignored the way he expected.
Of course, the above is only to explain how the biker felt, and why he reacted in the way he did. What you did was perfectly correct, and please continue to drive like this. Because, this is exactly what we need: Both bikers and motorists who know the rules of the road, and abide by them! If your behavior were not the crass exception that it unfortunately is, the average bikers would react in a much less panicky way.
Some legal background
(This is what I know that it applies in my country, but I am not a lawyer. So, please take this with a grain of salt and refer to your local laws, regulations, and court decisions for better info.)
I don't know about your jurisdiction, but in my country, motorists are required to keep more lateral safety distance from bikes and motorcycles than from cars. For car-to-car, the minimum is one meter, for motorist-to-cycle, the minimum is 1.5 meters.
The ASCII graphic below shows the result of these lateral safety distance rules, along with a typical two lane road in my area:
Required distances in my country: : Actual road in my country:
:
parking cars : parking cars
------------------------- : --------------------------
^ : ^
1m safety distance | : |
| : |
-------------------- | : |
| : |
| : |
2m oncoming cars | : lane, oncoming traffic |
(buses and trucks | : |
take 2.5m) | : |
| : |
| : |
-------------------- | : |
| : |
1m safety distance | : === === === === | 7m total
| : |
-------------------- | : |
| : |
| 9m total : |
| : |
2m overtaking car | : |
| : bike's lane |
| : (cars must wait) |
| : |
-------------------- | : |
| : |
| : |
1.5m safety distance | : v
| : --------------------------
| : parking cars
-------------------- | :
0.5m bike | :
-------------------- | :
| :
1m safety distance | :
v :
------------------------- :
parking cars :
You see, unless the bike manages to ride through the parked cars, there is simply no space to overtake a bike when there is oncoming traffic. The result is, that the entire lane effectively belongs to the bike, any motorist must wait for their chance to overtake.