Two different cars, designed for different markets.
Model S is the best looking, smoothest riding, quietest, air suspended, faster, longest range, quickest charging and has a hatch for more storage.
Model 3 is more nimble and zippy, easier to park, sportier, more compact, 4 door sedan with a trunk.
Both are great vehicles, and include lots of Tesla goodness. S is a grand touring car, while the 3 is a sporty sedan.