In the US, direct deposit is process via the Automated Clearing House "ACH", which is made up of member banks, and two (2) ACH operators (Federal Reserve and Electronic Payments Network "EPN").
When your Employer (in the case of direct deposit of payroll) or the US Federal Government (in the case of Federal Tax Return) creates an ACH credit entry for your account they need to supply multiple pieces of information to route the credit entry through the ACH network. As you stated, they do need your financial institution's routing transit number and your bank account number. They also need to set the account type (checking, savings, loan, or general ledger) customer name, customer id, etc. In short, the account type is required because the ACH file format, promulagated by the National ACH Association, mandates it. [http://www.achrulesonline.org]
Please keep in mind, that the receiving bank of our hypothetical credit entry, can still post the money to your account if the account type is set incorrectly. Ultimately, if the ACH transaction makes it to your bank, they can post it or reject it back to the originating bank. If they do post the credit to your account even though the account type was set incorrectly, your bank will probably generate a Notification of Change "NOC" ACH entry and forward it to the originator.
NOC entries are used to notify originators, such as your employer, that they need to make one or more updates to the direct deposit information they have on file for your account.
So yes, it is important that you check the correct account type box when setting up direct deposit.
For more information, you can review the ACH rules online at the following web site.
http://www.achrulesonline.org/
ACH on Wikipedia
http://en.wikipedia.org/wiki/Automated_Clearing_House