You can read the iMovie licence, if you launch iMovie and go to the menu "iMovie > About iMovie". Click the button "Licence Agreement".
Look at section 2. Permitted Use and restrictions, paragraph G. iMovie Features and Support.
"The Apple Software contains media content including but not limited to graphics, audio clips, video clips and/or templates (“Media Content”). This Media Content is proprietary to Apple and/or its licensors, and is protected by applicable intellectual property and other laws, including but not limited to copyright. Except as otherwise provided, all Media Content included in the Apple Software may be used on a royalty-free basis in your own video projects but may not be distributed on a standalone basis (and audio Media Content may only be used for your own personal, non-commercial use)."
As you can see, the use of the audio Media content is restricted to your own personal, non-commercial use.
For commercial purposes I would use GarageBand and not iMovie to create the soundtrack for your video. The GarageBand licence is different and allows commercial use, see: Using royalty-free loops in GarageBand with commercial work - Apple Support