How can an iPad in airplane mode detect iOS update? I have an iPad Air 2. It only has Wi-Fi capability and I keep it in airplane mode as I don't want it linking to my iPhone or other Apple accounts and disrupting any in progress memo recordings.

Well, the iPad has been in airplane mode for the last 1 week. This morning I saw on my iPhone that an update was available so I went ahead with that update. When I accessed my iPad to update and went into settings to turn off airplane mode I noticed that it had already detected that an update was available!

How is that even possible when it had been in airplane mode all week?
By default Airplane mode disables all wireless frequencies on your device so that you can comply with airline regulations. This means that any radio frequencies relating to cellular, Wi-Fi and Bluetooth are disabled.
However, when your device is in Airplane mode, it is actually possible to manually enable Wi-Fi and/or Bluetooth. And, if you do, the next time you're in Airplane mode these settings remain.
So, the most likely answer is that at some point you activated Wi-Fi during Airplane mode (either intentionally or by accident) and that ever since your iPad has sill been connected via Wi-Fi whenever you've activated Airplane mode.
As per Apple:

Use Wi-Fi and Bluetooth in Airplane Mode
If the airline allows it, you can use Wi-Fi and Bluetooth while in
Airplane mode. You just need to turn them on separately. On your
iPhone, iPad, or iPod touch, you can turn on Wi-Fi or Bluetooth with
Control Center. Open Control Center from the Home screen and tap [the Wi-Fi or Bluetooth icon]. You can also go to Settings &gt; Wi-Fi or Settings &gt; Bluetooth. To use
Wi-Fi and Bluetooth on your Apple Watch, just turn off Airplane Mode.
If you turn on Wi-Fi or Bluetooth while you're in Airplane mode, they
will be on the next time you use Airplane mode, unless you turn them
off while in Airplane mode.

Source: Use Airplane Mode on your iPhone, iPad, iPod touch, and Apple Watch, Apple. [Bold emphasis mine, words in italics added for clarification]
The following screenshot is from an iPad in Airplane Mode and connected to Wi-Fi at the same time:

Related reading

Use Bluetooth and Wi-Fi in Control Center with iOS 11 and later