I did just what you’re suggesting — bought the bike before taking the MSF course. And I did have to “unlearn” some habits. But the habits I had to unlearn were things like covering the brakes while riding (they teach not to, while others — like Hough — teach to cover them), or using 2 fingers on the brake lever.
In Washington, there is no requirement to have a learners’ permit prior to taking the course. I went ahead and took the DMV written test, though, so that I would be legal to practice riding before taking the class.
Would I do things differently if I had to do them all over again? Probably. But that has more to do with what’s happened after the class (my wife not passing her class, and her very slow climb up the learning curve) than anything else. Reason is, part of the “why” I got the bike I did was because we’d planned to doing some longer road trips together, and it looks like she is going to be a lot slower in getting to that point of ability. I could have done fine with a smaller bike (not that I’m afraid of the bike I have) and upgrade in a year and still not impact the schedule of our planned trips at this point.