Why aren't multimedia codecs included by default?
Are there any legal reasons for that?
Solution 1:
Some are for legal reasons - some video/audio formats require further license agreements or don't quite fit under the Ubuntu license schema. You can read more about this on the Ubuntu Wiki: Restricted Formats page.
I know that Ubuntu Studio comes with a lot of these codecs and "drivers" already installed. However for an average desktop user it's a lot of overkill as it's designed for multimedia market.
Solution 2:
Medibuntu.org provides an easy way to install many "non-free" codecs and multimedia applications that are not available in the main distribution for legal or philosophical reasons. It is up to you to ensure that it is legal to use such codecs in your country.