LiquidCrystal begin() errors when outside of setup()

Using the IDE on OSX, the following code :

#include <LiquidCrystal.h>

// initialize the display
const int rs = 7, en = 8, d4 = 9, d5 = 10, d6 = 11, d7 = 12;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

// Setup LCD
lcd.begin(16, 2);

void setup() {
  
}
void loop() {

}

Produces an error

references:8:1: error: 'lcd' does not name a type
 lcd.begin(16, 2);
 ^~~
exit status 1
'lcd' does not name a type

I am just interested in why the lcd.begin() call must be within setup() function in order to compile without errors.

Because it’s a function call.
Function calls must go inside a { } code block (which must be inside/part of a function).

If it's outside a function it must be a declaration. If it's a declaration it must start with a data type. The identifier 'lcd' is the name of an object instance and "does not name a type".

Thank you so much - Been many years since I played with C - I've been corrupted by too many years working in Perl, PHP and python. Will try not to ask such a noob question again!