Why does the Earth orbit its axis in the same direction it rotates the Sun? Suppose you are the young Earth that is being formed in the early solar system. Let's say north is up, so left of you is the (soon to be?) sun, since the Earth orbits the sun counter clockwise. Stuff that is left of you is closer to the sun and is therefore going faster than you. Similarly, stuff to the right of you is going slower. It seems to me that by accreting stuff there is a  torque on the Earth which acts clockwise. So I would expect that the Earth spins clockwise around its axis. However, the Earth is spinning counter clockwise on its axis.
What am I getting wrong?
 A: 
What am I getting wrong?

You are getting a number of things wrong. First and foremost, that's not how terrestrial planets formed. Your model is a bit more applicable to the formation of giant planets, but even then what you wrote is incorrect. The gas and dust in the neighborhood of a forming planet are somewhat buoyed outward by pressure, making that gas and dust orbit at somewhat less than orbital velocity. A forming planet is disconnected from that outward pressure, making it orbit at more or less orbital velocity. A forming gas giant sweeps through that cloud of gas and dust.
Getting back to terrestrial planets, the dominant theory is that, with a sprinkle of magic (a number of unsolved issues remain, particularly the so-called "meter size barrier"), bits of dust collected into larger bits of dust, which eventually collected into pebble-sized objects, then bolder-sized objects, and so on. The near-end result was a few hundred objects the size of the Moon to Mars.
These protoplanets collided with one another in pairs to form even larger objects. The rate and orientation of the rotation of a post-collision object was very much dominated by the geometry of the collision rather than the individual rotations prior to the collision. That the Earth is rotating more or less (more or less meaning within 24 degrees) in line with the Earth's orbital plane is pure happenstance.
Ignoring that Venus is upside down, there are three other terrestrial planets that also happen to be oriented somewhat similarly. Mercury is tidally locked (strictly speaking, it's in a 3:2 resonance, but for a body with a large eccentricity, this resonance is more energetically stable than a true tidal lock). Whatever orientation Mercury had primordially has long since vanished due to torques from the Sun. The same applies to Venus. Venus is close enough to the Sun that it experiences significant torques. It, too, appears to be in a final state. With regard to Mars, it's rotational state is chaotic, with the orientation of the rotational axis varying by over 60 degrees. There's no telling what Mars's primordial state was.
That leaves the Earth. The dominant hypothesis regarding the formation of the Moon is that the last big thing to whack the Earth was a Mars-sized object. This collision happened to leave the Earth with an orientation only 24 degrees off from its orbital angular momentum axis. Extrapolating meaning from a significant deviation from zero is always dangerous. Extrapolating meaning from a sample size of one is even more dangerous.
