In the old days of radio when Morse code was still used, radiomen used the letter "R", dot dash dot (di-dah-dit) as a quick way to transmit acknowledgment of transmissions or as a "yes." When voice radio telephony was developed, the old radiomen stuck to the "R" as meaning yes. Since the phonetic alphabet for "R" then was Roger, the carryover was a natural logical development.
Roger is abused (no pun) quite often as people think it means "I will comply" when it fact it only means you received the transmission. "wilco" is of course the phase that affirms that you are going to comply.
Simply saying roger doesn't mean it's gonna get done where as "roger, wilco" gives the brass warm fuzzies