I'm an Aikido beginner and haven't had many classes yet, so I hope this is not a stupid question. My teacher recently said that when we practice with someone then the attacker should adapt to the defender before he starts the exercise. With adapt I mean that if the defender has his left foot in front for example then the attacker should make sure the he has also his left foot in front and not his right. But when I tought about this at home it didn't make any sense. In the real world you do not know when you will be attacked, so why shouldn't the defender adapt to the attacker?
Not specifc to Aikido, but here's my impression from other martial arts.
Generally when you do the drills, you are trying to eliminate many of the variables and focus on the technique as it flows a particular way. So if the technique in that form is supposed to be practiced with a closed stance (same foot forward), you ensure that both parties have the same foot forward before starting the drill. This doesn't mean that in reality you won't have to deal with an open stance (opposite feet forward), it means that for the purpose of that technique and the purpose of that drill you practice in that particular way.
Then, later, you also practice open stance variations and there are other drills where you as a defender simply get to figure out what to do and respond, having now trained a variety of techniques. The important thing to remember is that this is one style of practice in an art that encompasses many different approaches.
My understanding of Aikido is that in many traditions, especially during practice, they take this one step further and the attacker will often "guide" or "help" you through the technique. This is designed to help you learn how to move your body under optimal conditions, so that you know the technique better before adding additional degrees of complexity.
Different schools handle the details of how all of this works differently. In most martial arts I've been in, we start with one hand and then switch to the other: rather than see that the defender has the left foot forward and adapt, we instruct both parties which foot should be forward and then switch.
The goal, however, is the same: To help you learn the fundamentals of the technique so that you can see how it works and learn to apply it, and so that you can improve your ability to move and control your own body. Then, as you progress, you get to see more variations and may also deal with resisting or (either fully or partly) spontaneous opponents.
I think you are missing a crucial distinction here: kata vs randori practice. Or practice of a form to learn the movement (aka kata) and making that movement yours and applying it (aka randori). Kata is designed to make you do the technique in a rigid and fixed form. It is here to teach your body how to react, how to move, and why this is a reasonable option given uke's attack. In randori, you start making those movement yours. This takes time and is really hard. It is the first part of Shuhari where shu corresponds to kata training and hari to randori training.
Since you are a beginner in Aikido, the attacker (aka the more experience practitioner) adapts to make your learning more effective.
My answer may look stupid and comes from common sense more that from aikido trainings, but:
In these exercises defender usually studies one specific technique (this includes specific stance, attack etc.). This means that before attack both uke and nage should come to specific stance (for example, Ai Hanmi). As far as nage's training is primary now, uke should adapt to him to make training faster and smoother.
After that, the process gets different: for example, uke is attacking from both sides and stances, so nage should use at least 4 techniques to defend himself.
This is closer to real life, but needs knowledge of the techniques, which is obtained in the way you describe in the question.