Lufthansa Systems interview question

Why do we use middleware?