I guess it would take up too much space in the code to program and AI that changes behavior based on varying conditions like and would be feat in programming in and of itself. I mean it would be great if some sim racing game development team managed to somehow pull it off. In regards to the penalties the computer opponents should have received them as well especially when they were at fault.
EDIT: Wait a minute I just thought of something AI in some racing games do indeed react to conditions in the game changing. Mario Kart for one the AI will try to block you from passing them(as it knows when you're coming close) will set traps to mess your lap up or blast you with shells. Also rubberbanding AI means that the AI will behave differently in some games depending on your standing in the race in this case slowing down or speeding up.
Last edited: May 26, 2020