Background - I was waiting for a flight on the ramp and noticed three planes at cruise on the same heading (flying "close" together but altitude and spacing I don't know). They tracked over the sky for a little while when one of the planes on the outside broke off at, I'd say maybe a 45 degree angle, for about ten seconds and re-joined the heading.

What would the reason be for that and would it be a pilot request or ATC?

I assume you were in YHZ, which is usually close to our oceanic tracks this time of year eastbound. (Sometimes westbound too)

Anyway, because of the nature of the NATS (North Atlantic Track Structure) it often occurs you have multiple aircraft on the same track heading to their OEP's (Oceanic entry Point) While other aircraft cross these tracks, sometimes you end up with "stacks" of aircraft occupying the same piece of horizontal airspace separated often by the minimum 1000'

It is not uncommon during the summertime flows to see a stack like: 37,000/36,000/35,000/34,000/33,000/31,000 (34/36 used for eastbound flight during the flow structure, and 35/39 used for westbound flight during westbound flow structure)

Now sometimes it ends up a "high flyer" will end up getting jammed underneath some of these stacks (752/763 stuck under an A342 for example) which means they are travelling the same speed and the 757 may want higher, so usually the controller will tell the pilot to wait to find out what their cleared oceanic level will be (no sense moving an aircraft if it will just need to move down again 15 min later)

In any case, if/when it comes time to move someone from bottom-top or vice-versa, ATC will give a vector of anywhere from 30-45 degrees usually to establish lateral separation, then drive the aircraft above the relevant traffic, and clear them usually their then current position direct to their next fix (usually their OEP or the fish points), rarely do we need to tell the airplane to return to track in our airspace since it is under radar coverage, and only need to be "On Track" at their OEP.

Another reason MAY be that depending on the radar and atmospheric conditions of the day, having airplanes stacked like that can cause faulty returns, ghost targets, and false conflict alerts, which is distracting and generally annoying but also affects safety to some degree. Some controllers will issue a short 10-15 second vector just to get a half mile of lateral separation so the SSR radar can discern the targets.

There's nothing worse than being in a busy sector and the radar for a split second displaying two aircraft at an identical altitude in the same piece of airspace!