Hi Utkarsh,
As Hemant has pointed out, you probably have to adjust your AVR speaker setup and surround modes. The sound quality on the WDTV is excellent, no doubts on that provided you configure the WDTV audio output to digital and use the optical out. Also make sure you're using a good quality optical cable not more than 1.5m long because a poor quality one or a longer one could introduce jitter in the signal.
I connect mine to my TV via HDMI and to my AVR through the optical out. A good tip for you, since the WDTV doesn't process Dolby Digital and DTS (being only pass through) sometimes certain files don't play audio. What I do is keep the same connections but change the audio out on the WDTV to the setting other than digital for playback of that file. It's not the same effect but at least the audio works. Worst case scenario, you could use a software like "Any Video Converter" to re-encode the file for playback. Certain files using AC3 or AAC audio may have playback difficulties and may require re-encoding. I also use "MKV Merge" to re-encode audio only on MKV files to one that is playable on the WDTV.
As you mentioned before, the poor SQ during the demo of your AVR could be a result of poor quality encoding of the files being played. It's quite common for downloaded MP3s to be of lower bit rates (96kbps or so). Best way to check is to rip one of your favourite CDs using iTunes at 192kbps and see.