Decode then re-encode, not just rewrap
AVI can hold many video codecs - MJPEG, DV, Xvid/DivX, Cinepak, or even uncompressed frames - none of which MP4 players expect by default. The tool demuxes the AVI, decodes each video frame and the audio track, then encodes the video as H.264 and the audio as AAC before muxing both into a new MP4 container, so output quality depends on the encoder's chosen bitrate.