It would be great if that were how it was taught, but when I took the class it was taught as a trick. No theory behind it, just the prof on the board saying, "But look! :swap: And now you can integrate it."
It becomes a technique once you realise it is a specific case of change of bases.
Even just getting to basic theorem of algebra does not provide this insight.