Zend certified PHP/Magento developer

Do video containers affect video quality ? Or is it just the codec?

Do video or audio file containers (extensions) have any repercussion with the video in itself ? Or is the codec used the only thing that has a repercussion ?

For example I have the exact same video source compressed with the same codec, let’s say VP9. If I put this video in a container .mp4 or .mkv or .avi or .webm, will it have a repercussion on the video depending on the container I’ll have used ?

Can some codecs only be used with some containers and vice versa ?

To be sure I understand, a codec is used to compress a video or an audio in order to reduce its quality or its size (less Bytes). But do we have to use a codec ? Can’t we just read a “pure” video without compression without having applied a codec ?