Hi,
The Microsoft Core Fonts are globally considered legal for installation.
Generally speaking, packages that are included in the official Linux repositories are not encumbered by any copyright or patent restrictions that would make it a crime to install.
Note however that the Msttcorefonts is provided in official Ubuntu software sources, is not free open source software.
This package installs proprietary fonts copyrighted by Microsoft, when you install it you are asked agree to Microsoft's terms of use for these font.
Best regards,
Leon