Both, potentially. If the officer is required to attend traffic court, he is paid for his time spent in court. If an individual is cited for speeding, they pay a fine. Either way you try to slice it, there is nothing fishy about it. All of this can easily be avoided, however, if one simply follows the posted speed limit.
We get compensated for going to court but it also usually hits in the middle of the day. So much for a day or morning off. Some of our more serious (felony) cases require us to go to pre-trial conferences, hearings, delays...sucks.