The US tax system is one of the most complex in the world. The tax code is 6,871 pages long according to one estimate. When all the guidelines and regulations are included it goes to 75,000 pages !
The reason for the complexity is the tax code constantly gets updated with all kinds of exclusions, deductions, etc. For example, buying a home allows for certain tax benefit if some conditions are met. I came across the following infographic that shows how the US tax system works:
Click to enlarge
How the U.S. Tax System Works, courtesy of Peter G. Peterson Foundation