In my opinion the fans who are doing this, think that they are helping the club by determining the booed player to leave the club sooner rather than later, in this case because the player is deemed not good enough to fit the shirt.
Also as a fan, you have the right to express your gratitude, joy or disapprovement of an action or a player of the club, fans aren't robots either programmed to cheer and sign without having any emotion or opinion.
I am not saying that Maguire deserves to be bood, I personally wouldn't do that only for on pitch performances, but others may be more demanding or ruthless than me.