In NSW there is no requirement to leave the lane you are travelling in to overtake a vehicle in front but it must be done with safety.
That would mean that at the time of the collision the motorcyclist was not doing anything against the law, just not very sensible.
Brad