JavaScript module system and React Components

Consider the following simple react app component which is in its own file, App.js and the App component function is exported as default and then imported to main.js file. My question is that why the code other then the App function executes in this file either that be imports or console.log(‘outside function’). Shouldn’t only the code of function should execute when we refer this component in main.js?

import Alexa from './alexa.png';
import Siri from './siri.png';
import Cortana from './cortana.png';

console.log(Siri);
console.log(Alexa);
console.log(Cortana);

export default function App() {
  return (
    <div>
      <h1>Hello, React world!!!</h1>
      <img src={Alexa} alt='' />
      <img src={Siri} alt='' />
      <img src={Cortana} alt='' />
    </div>
  )
}