Basically, Sik, think of it as a conscious looking the other way. SEGA knows fangames exist, but it wouldn't be beneficial to shut them down because they'd lose some of their fanbase by doing so. Fangames also provide a means of free advertising, because people searching for Sonic will find a gigantic community entired based on SEGA's copyrights, which they can then merchandise and sell.
I would have left the Sonic community long ago if it weren't for the fact that fangames exist, and if I had, I wouldn't still be buying their games. So essentially, by ignoring fangames like SRB2, they gain some public relations as well as a few fans, for less money than it would take to shut us down. Seems pretty win-win to me.