A switch's job is to
- accept ethernet frames,
- read the source MAC address in the frame header
- record that MAC address against the port it came in from in something called the MAC-address table
- read the destination MAC address in the frame header
- lookup the destination MAC address in the MAC-address table and find out what port to send it out
- send ethernet frames out that port
- (rarely) when there is no entry in the MAC-address table, send the frame out ALL switchports EXCEPT the port is was received on
- forward broadcast frames out ALL switchports EXCEPT the port it was received on
It also does stuff with VLANs and multicast, but you can worry about that later.
So, think about it - you patch two switches together, TWICE - you now have a loop: if a broadcast frame is received from a device, it can go round and around. That's where spanning-tree comes in - it disables the loop.
However, link aggregation combines the two links as a single virtual link, and intrinsically eliminates the loop.
Link aggregation is way better than spanning-tree, if it is available.