Why do Math journals provide you with LaTeX class files and instructions and they also advise you not to spend time typesetting the paper? This is what I don't understand. Journals provide you with LaTeX class files and instructions and they also advise not to spend time typesetting the paper into the exact format of the journal. What does this mean? I don't know if this applies to all journals or to most of them.
I don't know, but here's a possibly useful tip: when I get sent latex style files and complicated instructions for how to format my (accepted) paper, I usually try right away to get these files to work and to format things in the way asked of me...for up to half an hour.  If at the end of half an hour (or slightly less if I am feeling impatient that day) the task is not yet finished, I generally give up and say that I wasn't able to get the style files to work.  In almost all cases, the editor in question asked no further questions and gladly did the formatting himself.

The exception was a note I submitted to the American Mathematical Monthly, where they were extremely picky and passive aggressive about the changes they wanted made.  After at least six (not an exaggeration!) emails from a secretary of the form "For some reason you still haven't included your references in the proper format..." I lost my cool a little, gave them blanket permission to format the (three page!) paper however they wanted, and requested that they leave me out of it.  Which they did, and the note appeared a few months ago.  

Moral: this is one of those tasks that will expand to take up as much time as you let it.  Given that most journals have professionals who will devote further time to typesetting your paper after you sign off on it anyway, why not sign off on it sooner rather than later?

Let me add as a counterpoint that there are some smaller, internet based journals where most of the nuts and bolts work is done by a single person, who is working hard to put out the product rapidly and well (example: the Journal of Integer Sequences).  In fact I seem to recall that Prof. Shallit of JIS spent some time reformatting my accepted JIS manuscript, which then got electronically published within a few days of its final acceptance.  He really went above and beyond, and if I have it over again I will do more on my own side.  

Added: Looking back at your question, I worry that I may have misinterpreted it: are you asking about the initial submission of the paper? Definitely do not mess with any style files or publication instructions before your paper gets accepted. I agree that "instructions for authors" pages seem ambiguous on this point, but in all of my experience authors, editors and referees have a common understanding: first we decide whether we want to publish the paper, then we worry about its format and type-setting.