This is typical of some companies. The interviews you have had so far are probably where many would be weeded out, and from the sound of it, it might be a case where there are many applicants. The phone interview was probably cursory and probably determined you were going to get called in for the test. The interview with the manager showed how well you would work with your boss i.e. how much he liked you and the test was on your skills, etc. The latest interview was probably the last step, as you have passed all their other criteria so far. The 3 week waiting is probably to meet with several different people in the corporate food chain discussing you and the other candidates (if there are any) and also to run background checks, etc. I know about 2-3 weeks is standard practice though.
Notice the many "probablys" in the preceding sentences; I have no inside experience with this process, other than working directly with people who do hiring, and talking to them about candidates, etc, as well as my own interview experience, so take it with a grain of salt.
Best of luck, hope everything works out for the best.