Is there some advantage to having each attribute laid out contiguously in memory?
It's better for cache locality of data access. Memory access is slowest part of all modern computing systems. As memory buses pull in multiple bytes in "cachelines" and most modern CPUs will prefetch memory that it detects are being accessed contiguously, keeping data that is used sequentially laid out in memory contiguously can have a signficant ans positive impact on efficiency.
That said, performance fetishism is not as useful as one might think, even in games. Plenty of big AAA games use something closer to the other technique you mention. There are places where cache locality of data is super important and places where it has little meaningful impact. Sometimes, ease of implementation or ease of maintenance will be more important than raw performance. A particle system is a place where every little bit of performance matters, for example, but an entity or component that only exists on a few dozen actors doesn't need to be maximally efficient.
A component-based architecture can use some ES-like techniques (a System that operates on contiguously-allocated data associated with Entity ids) for some components and can use a simpler container of objects for other components. There's no reason that one has to shoehorn oneself into the ES pattern for everything. A well-designed simple component architecture lets you use the appropriate design methodology for each component.