Actually, it is not as much a matter of paying maaser, but of the ease of calculation. For example, consider an investment of money in tax-free municipal bonds. The money that you take from the bank to pay for the bonds has already had ma'aser "taken out". Thus, when you cash in the bonds, only the interest or profit on the bonds is subject to ma'aser. This is similar to a Roth IRA or 401K that you fund from your own bank account. On the other hand, if you take money from your bank account and supplement it with the appropriate amount of ma'aser money for an investment, then all of the money in that investment including the principal will be subject to ma'aser when you withdraw it. This makes it easier to perform calculations and to handle the money.
Using the tax status of the money is merely a convenience to allow you to determine how much of that money is subject to ma'aser. Since the government keeps track of the Roth IRA tax status, you can pay ma'aser on the post-tax investment and let the government calculate the difference for you.
On the other hand, if the money came in to the Roth IRA by direct deposit, and you had calculated your ma'aser based on your net paycheck received, then you would consider every penny in that account (including the original post-tax investment) as pre-ma'aser.
Another analogy would be money that you put into a pushka at home. You wait until the pushka is full before sending a check to the charity. Here to, any ma'aser that is in the account, will be taken and sent to the charity when you take out the money. In fact, I would say that if a bond matures and no longer earns interest, you can send the appropriate amount of ma'aser and consider the entire bond as "post-ma'aser". It is as if you had bought that portion of the bond from ma'aser for yourself.
I hope that this makes the concept clearer.
When I was setting up my accounts, the matter was more a function of the way ma'aser is calculated rather than when the tax is taken. If the money is direct deposit, then you can calculate the ma'aser on the amount that is deposited into your checking and savings account. In that way, the Roth is treated the same as the 401K and is subject to ma'aser when you withdraw it.
Many discussions consider the tax withheld on your paycheck like the expense in a business and not subject to ma'aser (since you never receive it). In that case, any tax refunds are considered income and subject to ma'aser. Similarly, any money withheld from your paycheck is never received by you and is an expense and not part of your income.
That is why a store pays ma'aser on the net and not the gross sales as only the profit is subject to ma'aser.
If something that is not considered a maaser expense is withheld from your pay chack, then you would have to add it back into the calculation. However, this normally does not occur. An example might be if your company withholds a charitable donation that is deductible, you would have to remember to put it on your schedule A. Just counting the net pay is just the normal way of handling matters.
I go into more detail on the matter at Can tax ever be considered maaser?
Maaser Kesafim and the Development of Tax Law
Text on this
Maaser Kesafim: Giving a Tenth to Charity Domb, Cyril (editor) Halacha Feldheim 1999
From times of old it has been an honored Jewish practice to give maaser, a tenth of our earnings to tzedaka, charity. Yet a great many questions arise when we proceed to fulfill the mitzva. For example: how is income defined? Are capital receipts subject to the obligation of maaser? If they are, how should indivisible assets be dealt with? Is there a specific "tax year"? What expenses are allowed? How is capital investment to be dealt with? How are charities defined, and is there an order of priorities in the matter? To find answers, a research team of the British Association of Orthodox Jewish Scientists made a careful study of the Shulchan Aruch and the responsa literature. Where no clear-cut answers could be found, the next step was to turn to the great Torah authorities of our day. This book is a record of the results of their investigations.