MKV, AVI, MP4, etc are just container formats. The important choice is the codec used and settings used for it.
For example back in my hardsubbing days (~6 years ago) I'd release AVI contained files encoded with xvid 3-pass with a 1500kbps average bitrate video and 192kbps mp3 audio (working out to ~200kilobytes per second).
When i switched to dual audio ogm containers (similar to mkv containers) i kept the same video settings, but started to encode two audio tracks @ 128kbps ogg vorbis (working out to ~200kilobites per second).
I could have encoded those same files with 1000kbps average video bitrate and 64kbps average audio bitrate, which would have saved space (133kilobites/sec avi 141kilobites/sec ogm) but traded off quality, but they would have both been valid avi and ogm files.
I also could have been lazy and just used single pass encoding, which while using less CPU time generally led to lower overall quality in the encode while having the same file sizes and using the same bitrates.
Basically it's not the container, but the codec settings. When you are working with digital video you will want to compare the codecs used, the settings for the encode, any extra things going on (e.g. it was common for me to deinterlace and use a filter to remove NTSC rainbow effects when I was working with media recorded from tape source). AVI vs OGM vs MKV/etc is irrelevant, you're more concerned with xvid 1500kbps VBR 2-pass vs xvid 1000kbps SBR 1-pass vs divix 1500kbps n-pass and so on. Paradoxically i've noticed loss of quality when going with more than 2 passes on a divx encoded video stream.