That's a very good question. I also don't understand why TSA thinks they need to swab a CPAP machine but not a laptop or other electronic equipment. But I have found they are at least generally pleasant about it.
I haven't tried to use my machine on-board. i can't sleep well on planes anyway, even with a lie-flat seat. I can nap a bit but don't ever really sleep.