From People v. Schindler, 20 Cal. App. 4th 431:
At the arraignment the trial court advised that if prior to trial, a defendant pleaded guilty subject to being granted traffic school, the court would grant traffic school.
The court further advised that if a defendant was convicted after trial, the granting of traffic school was an alternative sentence within the discretion of the court, that the court might or might not grant traffic school and need not give a reason for granting or not granting traffic school. The court stated that a request for traffic school would be judged in light of all the facts presented to the court. The court gave an example that if a defendant was found guilty of driving 30 miles per hour in a 25-mile-per-hour zone the court might grant traffic school, but if a defendant was found guilty of driving 80 miles per hour in a school yard the court might not.
Appellant offered to plead guilty to violating section 22349 at a lesser speed. The court advised that it would not accept a plea at a lesser speed, treated appellant's offer as a plea of not guilty, and tried the case. Upon the citing officer's testimony, the court found appellant guilty as charged.
After conviction, appellant requested traffic school The court denied this request. Appellant requested the court to give its reasons for not granting traffic school. The court declined to give an explanation.
Under section 42005, the court may order traffic school. Although the court may not arbitrarily refuse to entertain a request for traffic school merely because a defendant elects to plead not guilty ( People v. Wozniak (1987) 197 Cal.App.3d Supp. 43 [243 Cal.Rptr. 686]; People v. Enochs (1976) 62 Cal.App.3d Supp. 42 [133 Cal.Rptr. 363]), the court otherwise has discretion to grant or not grant traffic school for a traffic violation. ( People v. Levinson (1984) 155 Cal.App.3d Supp. 13, 21 [203 Cal.Rptr. 426].)
To require the busy municipal court to state reasons on the record for denying traffic school in individual cases would impose a time-consuming burden which interferes with the public interest in the efficient processing of thousands of infraction cases. The burden on the system and the public would be far out of proportion to the benefit to be gained by the occasional defendant who hopes to persuade a reviewing court that discretion was abused based on the particular circumstances of his or her case. Given the discretionary nature of the decision and the minor nature of the offense, the trial court should not be saddled with the additional burden of stating its reasons on the record, where the statute does not require it.
The OP in this case changed lanes without having the ability to ensure (for himself rather than counting on the ambiguous signal of another driver) that his action would not interfere with the normal movement of another vehicle which by some stroke of bad luck, happened to be an officer.
Although citations are typically issued to the "at fault" driver in an accident where injury or property damage has occurred, there is nothing that precludes an officer from issuing a citation if he decides that such action by the driver was in any way unreasonable, imprudent or unsafe and without having to have an accident as the reason for the citation.
We don't know how close the officer was or what action he had to take to avoid a collision. He apparently though the it was too close of a call (and you can bet that his testimony will attest to that) to just let it slide.