It lacks the air suspension available on the Tesla Model S and X and that's part of the reason why the Model 3 has worse ride quality than an old LEAF.

The other part of the equation comes down to tires (much lower profile on the Model 3) and sportiness, which the LEAF lacks. The LEAF is tuned for comfort, whereas the Model 3 is more focused on sporty, so we'd expect to see a result like this. However, that air suspension can make a world of difference. See here to more fully understand how the 3 differs from its air-sprung siblings.

Tesla Model 3 On Left, Nissan LEAF On Right

Video description:

The Tesla Model 3 vs Nissan Leaf on a city road. Which provides the smoother ride? Find out. Both cars are using stock wheels and tires. The Tesla has the 18" Aero wheels with the caps still on. The Model 3 is supposed to be "the first mainstream electric car" not a sports car.

The result is no surprise. The Nissan LEAF is a softly sprung family-hauler, whereas the Model 3 is basically a sporty sedan bordering on high-performance driving machine.