Sorry lestatdark, eggs2see has it. You are right about the swaying being the drivers trying to heat up the tyres, along with the small burn outs. Its also to heat up the brakes, as racing brakes don't work very well then cold
(particularly ceramic brakes). But hot clean rubber is the grippiest rubber. Yes they will pick up dirt on the warm up lap, although hopefully the track will be fairly clean after all the practise and qualifying sessions. But they don't go out of their way to pick up dirt, as it makes the tyres less grippy.
Waron, if you are going to criticise a racing game AI, at least try and learn what you are talking about. They drive the optimal line because its the optimal line, ie the fastest, which is what drivers want to be. Its the line that allows the faster corner speeds with the steadyiest cornering loads, maximising tyre longevity and preserving grip. The only time a driver might deviate from the optimal line is if the driver in front is slower and going onto a different line will either improve his front downforce being out of the dirty air from the car ahead, or maybe force the other driver to make a mistake when they try to cover, ie braking too late or going too wide.