actually, this is not true.
it's the simplistic rule of thumb that is repeated to everyone because it's simple and convenient and encourages maintaining safe distances.
in reality, there are circumstances in which courts rule that the breaking is unreasonable or even criminal incase done intentionally.
especially incase of changing lanes, the driver who changes lanes has the duty to be especially cautious because - at least under German traffic code - lane changing is only permitted if the manoeuver puts no other vehicles at risk. indicator and checking the mirror is clearly not enough, looking back over your shoulder is mandatory to fulfill that legal requirement.
of course, there is always the issue of proof - clear advantage to dashcams.
and responsibility for accidents can be shared. I guess that's what happened here, the OP didn't perform all necessary checks and the other guy drove recklessly.