This is a weird thing to me. I have a 2009 Subaru WRX that recently needed a rack and pinion replacement due to leaking fluid. I got it aligned 3 times, because every time when I got my car back, the steering wheel wasn't quite straight. On this third time, I noticed that sometimes, when I pull a harder corner in one direction, then go straight, the steering wheels is properly straight, but if I then turn hardish the other direction, it goes back unstraight. So it switches between being straight and unstraight. What could cause this???
One of the bearings at the top of the struts may be worn. This could be causing the coil spring to rotate slightly under hard cornering. This could then cause a slight pulling in one direction, making the steering wheel be slightly out. Turning in the opposite direction may then correct the problem.
If the rack work was done recently I would bring it back to the place that replaced the rack. My concern would be the possibility that the connection between the rack input shaft and the steering column may be loose. If this is the case it may get to the point where the steering wheel will no longer turn the tires. This case may not show up during the alignment as the front tires are on a turntable so very little effort is required to make them turn.