If there are two switches connected directly together with two links is spanning tree protocol needed? please see below snippet
Two links between two switches form a mesh: there are multiple paths between the switches. With default/no configuration, these links cause a bridge loop, bringing down your network (broadcasts circulate endlessly, MAC tables get trashed, ...).
If you want the dual link for redundancy, you need a flavor of STP (RSTP, MSTP, RPVST) that blocks one of the links logically unless the active link fails. Essentially, STP reduces the mesh to a tree where there's only a single path between any two points.
If you want to aggregate links for performance, you need to set up a link aggregation group (LAG), preferrably using LACP.
Alternatively, more advanced switches support protocols for both purposes like Shortest Path Bridging (802.1aq) or TRILL (RFC 6325).
Yes, of course it is needed because you have a loop. Spanning tree will pick a single path between the two switches, breaking the loop.
A layer-2 loop will cause your network to crash as it will perpetuate and amplify broadcasts until your network is overloaded. Spanning tree will determine a single, loop-free path to the root bridge, and it will block traffic on any other paths to the root bridge.