Basically, this is happening because you are putting two or more compasses in close proximity to each other. The needle on a compass basically is a magnet. The north side of the compass needle is actually the south pole of the magnet, which is why it is attracted to the Earth's north pole. (Remember: Opposites attract with magnets.) The reverse is true for the south side of the compass needle, which is actually the north pole of the magnet and is attracted to the Earth's south pole.

Now, what happens when you put two magnets really close to each other? Those two magnets will pretty much disregard the relatively weak magnetic field of the Earth and they will simply orient themselves opposite one another. One compass needle's magnetic south pole (marked "north") will attract the other compass needle's magnetic north pole (marked "south"), and you will have two needles pointing in opposite directions.

Solution… Move the compasses a ways apart from each other (and from nearby metal objects, other magnets, etc.) and they will again both point the way they should.
_________________________
“Hiking is just walking where it’s okay to pee. Sometimes old people hike by mistake.” — Demitri Martin