The pigs get the job of teaching and organizing before the Rebellion because they are recognized as more clever than the other animals. As the book puts it:
The work of teaching and organising the others fell naturally upon the pigs, who were generally recognised as being the cleverest of the animals.
This cleverness seems to include the quality some of the pigs possess of being good speakers. Snowball is described as quick in speech and inventive, and Squealer is considered a brilliant talker. It would make sense that the most persuasive animals would convince the other animals that they should be the ones to teach them.
The pigs put the ideas behind the Rebellion together into the system called Animalism. They also work to persuade the other animals that there is no such place as Sugarcandy Mountain.
After the Rebellion, the pigs reveal they have been teaching themselves to read and write, which naturally puts them in charge of teaching and organizing. They are able to orchestrate painting the Seven Commandments of Animalism on the side of the barn. Generally, they are able to take charge and guide the direction of the other animals, for good or ill, because they are always one or two (or more) steps ahead of the other animals' thought processes and mental abilities.
According to the text of the novel, the pigs are smarter than the other animals. However, the pigs are not as selfless as Old Major, the boar who originally predicted the revolution and died before it occurred. The pigs, especially Napoleon, Snowball and Squealer, condense Old Major's dream into a political philosophy called "Animalism" and proceed to take over the job of directing and organizing the other animals. However, as they continue to remain the supervisors, they do no physical labor, and they take extra food (milk and apples) for themselves instead of sharing with the others.
Pigs are generally known to be very smart and clever. In many ways, they are the ideal animal that could be used for teaching and organizing. This is one of the reasons that George Orwell chose to use them for these roles in his book, Animal Farm. However, unlike many teachers, the pigs are much more selfish. They tend to only want to do what they feel is best for themselves. If it benefits them then they are for it. They choose not to do any labor because they feel that it will not be an advantage to them. They begin to take more food for themselves and do not care if the other animals will have enough to eat. In irony, their "Animalism" philosophy is a slightly differentiated interpretation of Old Major originally intended to occur. He selfless acts and theory would have made the society better.