What is the purpose of using the spawn wrap here?

This is a bit of code that I found on the devforum, I am just wondering why this person used a spawn section here? Any explanation will do, thanks!

local handle;
mouse.Button2Down:Connect(function()
	if attacking == false and equipped == true then
		-- Only run if not already running
		if not handle then
			local currentHandle = {}
			handle = currentHandle
			blocking = true
			remoteEvent:FireServer("Block", true)
			spawn(function()
				-- Cancel if handle changed
				if handle ~= currentHandle then return; end
				
				remoteEvent:FireServer("Stun", true)
				wait(2)
				
				-- Cancel if handle changed
				if handle ~= currentHandle then return; end
				
				remoteEvent:FireServer("Stun", false)
				
				-- Allow next attack
				handle = nil
			end)
			CurrentBlockAnimation = block_Animations[math.random(1, #block_Animations)]
			CurrentBlockAnimation:Play()
		end
	end
end)

The spawn() function is there to prevent the stun effect debounce from delaying the following animation. There’s a wait command between the “Stun” remote events which would yield the entire script if the spawn() function wasn’t used.
ScreenShot_20210609192737

Ahh, makes sense. Thank you for your help!