If you are on a hot lap and making your trajectory on the main straight as short as possible and scrub the pit wall with your right side, the game detects that you are in the pits and automatically slows you down (if so configured)