Confusion about the script property and method

Hello, I’m confused with the public $scripts = []; and the enqueue_scripts(). For example, I use wp_register_script to register a script with name apple and I enqueue it like so:

public function enqueue_scripts() {
    wp_enqueue_script( 'apple');
}

If I understand correctly, this should already work for both admin and frontend? Why do I still need the public $scripts = []; and specify the script again like so:

$scripts = ['apple'];

public function enqueue_scripts() {
    wp_enqueue_script( 'apple');
}

That would be to run the function ‘apple’ whenever the element is added to the page in the builder, or if a setting is changed and the element needed to rerender.

The enqueue part is for adding the script, the $script array is for adding in function names.

The description of $scripts is in the docs Create Your Own Elements – Bricks Academy