Explain sidechain vs a rollup

User interaction with either of them seem very similar.
I understand a rollup stores the data on L1 unlike the sidechain and hence derives the security of the L1. But how does this work?
How does storing data on L1 (instead of a sidechain) make the L2 more secure? Also some information on how sidechains are different from rollups would be great.
Thanks!
submitted by /u/Err000r__1010
[link] [comments]