Network switches happen for a variety of reasons. A station may wish to switch networks if the station's current network has been not doing well for a period of time; a network may seek a better-performing affiliate in a given market, and/or an affiliate with a stronger signal (VHF vs. UHF); it could be part of a larger corporate deal, such as the recent LIN switches to NBC in Dayton and Springfield, etc.
I don't know the particulars of the network switch that occurred in Rockford, but I believe it occurred around 1995, not five years ago. NBC was the top network at the time, and perhaps they saw a chance to switch from a UHF station (WTVO on Ch. 17) to a VHF (WREX on Ch. 13). Quincy Newspapers, Inc. (QNI), the owner of WREX, also seems to have a good working relationship with NBC. At my count, they currently own 5 NBC's and 5 ABC's, plus one Fox. According to QNI's website, QNI acquired its current stable of ABC affiliates when it purchased Shockley Communuications in 2001...well after 1995. QNI didn't purchase WREX until 1995 (apparently the year of the network switch), so it would seem that WREX's switch to NBC was concurrent with the sale of the station or happened soon thereafter (whenever the network contracts expired). With the exception of QNI's Fox affiliate in South Bend, it seems that all of QNI's stations were with NBC in the mid-'90s.