EDIT and copy of the answer of Torsten Link to the difference with his friendly permission (see comments)
Das ist mir egal
is the official (though not very polite) way to say: I don't care.
Das ist mir Wurstwurst
is a colloquial way to say the same. You would usually not use this phrase in any official conversation (e.g. with your boss).
An often found answer to the etymology of this expression is, that a sausage ("Wurst") has two endings, so it doesn't matter from which side you start to cut or eat.
There are some more explanations as the expression can be found BC. But this is the one you can find the most.