The seeds for a map in minecraft is used inside a Pseudo Random Generator.
A pseudorandom number generator (PRNG) is an algorithm for generating a sequence of numbers that approximates the properties of random numbers. The sequence is not truly random in that it is completely determined by a relatively small set of initial values, called the PRNG's state.
Even though a PRNG with the same seed generates exactly the same series of random numbers, how they are used may often be different depending on how many random numbers are read off of the generator. Everytime a random number is used up, it may throw off the terrain properties, such as the direction a pig will walk, or whether or not a leaf block with no attached branches will decay. Unless everything is processed in the exact same order (impossible due to threadedness), no two worlds are exactly alike due to this property, but worlds using a particular seed will be very similar to each other, at least early on. As more numbers are used, such as to generate the terrain in a particular direction as you explore, the less they will be the same.
For example, if you use up a chain of random numbers to generate terrain walking east then west, it will be different than in a world with the same seed if you walk west then east.