It may be unsafe to ride alongside a vehicle in the lane next to you because:

If you ride directly alongside a vehicle that is in the lane next to you, the driver may not see you because you are in their blind spot. They may begin merging into your path without knowing you are there. Additionally, if you are directly next to another vehicle, the vehicle will block your path of escape if a hazard should appear in your lane.
DMV Writen Test