Initializing an instance of a class outside loop() does not work

Hi,

I created a library to move 2 servos at the same time based on measurings from a sensor.
I tested the functions and they work, but if I try to initialize an instance of my class outside the loop cycle on my main file, the program just does nothing, while if I initialize in inside the loop it does exactly what it has to.

On other libraries, I can initialize an instance (for example the Servo library that I use on my library) of the classes even before the setup.

I have tried initializing the instance inside the setup, inside of loop and outside of both and it only works when it is inside the loop.

What could be the reason for this?

This is my header file:

#ifndef MotionControl_h
#define MotionControl_h

#include "Arduino.h"

class MotionControl{
  public:
    MotionControl(byte servo1PIN, byte servo2PIN);   
    void updateSTEERING();        //Method to update the steering value
    byte calculateSTEERING();     //Method to calculate the throttle
    void setSTEERING(byte s);     //Method to set the steering to a given value
};

#endif

This is my .cpp file:

#include "Arduino.h"
#include "MotionControl.h"
#include "Servo.h"

Servo servo1;              //Initializing instance servo1 of the Servo library
Servo servo2;              //Initializing instance servo2 of the Servo library

MotionControl::MotionControl(byte servo1PIN, byte servo2PIN){
  Serial.println("motion controller created");
  servo1.attach(servo1PIN);
  servo1.write(90);        //We set it to an initial value

  servo2.attach(servo2PIN); 
  servo2.write(90);        //We set it to an initial value
  
  setSTEERING(90);  //Same as Servo.write but for both servos
}


void MotionControl::updateSTEERING(){     //Method to update the steering actuator
  setSTEERING(calculateSTEERING());       //Calculates steering angle and then sets it
}

byte MotionControl::calculateSTEERING(){  
//Calculates the steering values needed based on measurements 
return s;
}

void MotionControl::setSTEERING(byte s){   
servo1.write(s);
servo2.write(s);
}

This is my main file

#include "MotionControl.h"

//MotionControl motioncontrol(7,2); here it does not work

void setup() {
Serial.begin(9600);
Serial.println("Setup");
//MotionControl motioncontrol(7,2); here it does not work
}

void loop() {
MotionControl motioncontrol(7,2); //here it works
while(1){ //I use this so that the instance is initialized only once, as it is inside the loop
Serial.println("loop");
for(int i=70; i<115; i++){
Serial.println("testing setSTEERING");  
motioncontrol.setSTEERING(i);
Serial.println(i);
delay(1000);
}
}
}

Thanks!