Both are seminal, pioneering, and legendary hard rock/heavy metal bands. Two of the first songs most aspiring, new guitar players learn are Smoke On The Water and Iron Man, but who do you like better?
They both have had numerous line up changes over the years. Ronny James Dio once was Sabbath's singer. Purple once had David Coverdale of Whitesnake fame as their singer and Tommy Bolin as the guitarist. Hell, even Ian Gillian himself was actually the lead singer of Sabbath at one point and they even played Smoke On The Water live even though Tony Iommi said he was very uncomfortable with it. But lets keep it to their "classic" line ups of the original Sabbath with Ozzy on vocals and the 2nd version Purple line up with Ian Gillian as the singer and Roger Glover on bass.
I like 'em both a lot, Made In Japan is IMO one of the absolute very best live albums ever, but if forced to choose, I would have to go with Sabbath.