"opponents playing along" is half-accurate. In Aikido you spend most of your time practicing techniques with a partner, and they do not play the role of an uncooperative opponent for two specific reasons:
1. The goal of Aikido is to, through repetition, build muscle-memory of very specific techniques. These are very different types of techniques than what you'll find in say, karate, where it's basically kicking and punching. These techniques are designed to disable your opponent while minimizing harm. Aikido is also not about kicking and punching, it's about responding to kicks and punches (attacks).
There is simply no way to build that muscle memory other than by having repetition with a cooperative partner. To outsiders this may seem like opponents that merely "play along" with your attacks, but that is ultimately a misunderstanding of what's going on.
2. These techniques are painful if you don't cooperate. The reason the "opponent" seems to be "playing along" is because they have to do this over and over for the length of the class session. If you're a poor Uke (the opponent) and are uncooperative, you will end up missing most of your classes due to injuries. A good Uke will be uncooperative to the extent that it helps Nage (the person practicing the technique) learn the technique without seriously injuring themselves.