I agree with anaujiram, the process goes both ways (DJing helps with producing, and producing helps with DJing). If you just want to produce, then just buy production gear. If you want to just DJ, then just buy DJ gear, and if you want both (to become a famous DJ or w.e) you need to master both, therefore you buy both. Be mindful of your choice as it's an expensive hobby, and buying gear towards one direction while you may only want the other will cost you more in the long run.
I started with production, and slowly got into DJing, and now i do both. I honestly have to admit that DJing actually enhanced the flow and process in the studio. If you ever manage to land club gigs, you will more than likely (as I did) practice for hours and hours on the decks. You will likely learn a lot in the process about song structures, places for different effects and hits, etc (pretty much what anaujiram said).
Side tip: Whatever the case, you can sometimes kill 2 birds with one stone in the purchasing stage. For example, you may go out and buy 2 decks, a mixer, and 2 monitors. The problem in this scenario (which most amateurs run into, as I did), is you forgot to purchase an audio interface. Depending on the quality and number of inputs, it will cost you a pretty penny extra. You can work around this problem by purchasing a Traktor Kontrol S4 (I started on this deck, learned a hell of a lot using it) as it has a built in audio interface. so you can purchase a Trakotr Kontrol S4 (boom you have a deck + audio interface all in one), and then 2 monitors.