Republic of Ireland U-21 international Keogh moved to Championship side Wolves on Monday in a deal which could rise to £850,000.
Wharton insists the club wanted to keep the forward, but was swayed by public statements of interest from the midlands club.
Wolves boss Mick McCarthy had declared his hope of signing Keogh, along with strike partner Sharp, and leaks to the media last week appear to be the catalyst for this move.
"I know the fans will be very disappointed to learn that we have agreed to sell Andy, but I hope they can understand that this decision was not influenced by the transfer fee involved but Andy's insistence he be allowed to leave," explained Wharton.
"A number of clubs registered their interest in Andy, and we made it clear to all of them that he would remain at Scunthorpe until the end of his contract.
"It was therefore a complete surprise to us that he had his mind set on joining Wolverhampton Wanderers before they even had permission to speak with him.
"After discussing the situation with the manager and his assistants, we felt that Andy would not help our push for promotion if he was not 100 per cent committed to the team.
"As fans already know we turned down a very big offer for Billy Sharp, and I am pleased to say that Billy remains totally committed to Scunthorpe United."