From page 22 of the Eberron Campaign Setting:
Older warforged tend to be fighters or barbarians. The more recently created warforged, especially those less than five years old, are more inclined to try different class options.
Aarren d'Cannith created the first warforged 33 years before the present. They were mass-produced and sold to whoever could afford them, as squads of basic soldiers. It took a long time for special variants to be made and for warforged to begin to be given more complex roles in the armies they were purchased by. Warforged receive training in their creation based on their intended role, and this is reflected in their starting ages.
The younger the warforged is, the more likely they were placed in a role other than direct, frontline combat, and most warforged 2 years of age or younger weren't created as soldiers at all—they were made in secret against the terms of the Treaty of Thronehold. As such, they tend to be free to choose whatever life path they want (even if their creator wanted them as soldiers, it would be difficult to do it without a hammer coming down on them).
To answer the second part of the question: newborn warforged are utter sponges for information.
The warforged is born a blank slate, but it possesses a voracious appetite for knowledge. Just as the mind of a human child is more flexible than that of an adult, in its first few months a warforged possesses an astonishing ability to learn and adapt. A warforged may begin with no knowledge of the battlefield. But many Cannith instructors claim that the knowledge seems to be hidden beneath the surface, just waiting to be unlocked -- that within a few months of training, a warforged soldier may outstrip the skills of his teacher. The warforged must be shown the path to walk, but after taking its first steps, a warforged often picks up speed, learning skills in mere months that a human might take years to master.
After the first few months, however, the warforged's thought patterns crystallize, fixing on the path it has chosen. At this point, it is essentially an adult: It possesses the skills it needs to perform its chosen task, and while it can still learn new skills, this takes just as much time as it would for a human or an elf.
This means that the warforged who were allowed to learn to be other things simply... could. Naturally and intuitively. After that period mental growth, though, they learn as slowly as any other person. Thus, the more recent warforged have the aptitude for magecraft of the most complex varieties, just as the older warforged had aptitude for combat and battlefield tactics. All that changed is that new warforged stopped being built for only one job.