If you rear-end someone, it's pretty much always your fault. People are allowed to be stopped in the road for any number of reasons, and it's your responsibility as a car operator to be aware of your surroundings and able to stop your own car without hitting anything.