On a bike I always try to say to myself 'if I was driving that car would I be aware of a bike undertaking on my inside' often the answer is no, so I hang back.
Equally when driving with a cyclist just ahead of me, and I want to turn left, I hang back until the cyclist has past the junction rather than booting it past and cutting them up.