Why autopilot doesn't follow the pink line?

Have you set up the FMS correctly?

For LNAV to work - you need to be within the vicinity of the selected route in FMS and within +/- 10-30 degrees for it to work.

The autopilot will only follow the LNAV magenta path (pink line as you describe it) if you are within the vicinity of selected route.