As Jim Mack has correctly pointed out MKV (Matroska) and AVI are containers, and are both able to store many of the same streams without any change to the streams themselves, and thus the remuxing should be lossless.
But there is one time where data is lost when remuxing from AVI to MKV. The thing is that some poor encoders in the day of AVI have created technically playable AVI files which had some garbage data in one of the streams for part of the time. They used that rather than setting up timestamp offset.
Most AVI-to-MKV remuxers (like mkvtools) will take such garbage data and assume that it can be converted into the offset, when such garbage happens in the beginning. However, in some rare cases this may not work, for example when the bitrate of the stream with garbage in it is variable. This causes timestamps to be badly shifted.
If the garbage occurs only in the beginning, the problem is easily resolved by editing the header of Matroska file, and changing the offset manually until the streams match. However, if the garbage occurs several times, then remuxer will just dump the garbage and the timestamps cannot be fixed that easily any longer.
Now, this doesn't happen for most files, but some "old school" Whatever-to-AVI may produce such thing. And it is important to know, since even losing "garbage" is by definition lossy when it translates to metadata change.