Not only does it obviously take time to mass produce millions of copies of the movie on DVD, they of course have to transfer the original film to digital format, sound an all, and lots of times go through s'more editing, altering them slightly from their theatrical format, especially in the case of unrated/director's cut editions, and they also often compile bonus features to go on the DVD as well, which might still have to be selected, edited, etc.
But it's also good business, if they came out with a movie on DVD just after it came out in theaters, many people just recently saw it and aren't going to hop up (let alone pay more money) to see it again so soon, whereas aafter it leaves theaters but has yet to come out on DVD, when it finally comes out people who have already seen it and liked it are often ready and willing to see it again.
All that, and timing, like if a Christmas movie comes out in theaters just in time for the holidays, and then it's ready to come out on DVD by summer, how many people are going to buy a Christmas movie in the summer? Probably not many, so they wait a year until the next winter to release it on DVD in time for that Christmas.
Well for one thing, they probably make more money in the theaters that way. If a DVD came out a week after the movie stopped being shown, some people would just wait for the DVD if they really liked the movie, whereas I know people who have gone to see a movie five times in theaters before it comes out. Also, the waiting time might also contribute to them determining how many copies of the DVD they'll make, depending on how popular it was in theaters, so then they have to make all those DVD's, promote the crap out of it etc... A few months really isn't that bad of a wait.