In my opinion the comma facilitates appreciably understanding; if there is no comma you may possibly follow the logical path of thinking that the pandemic spread is brought about by something, although the word "instituting" should clear that idea right away. Instead the comma makes it more likely that the prepositional phrase "by instituting … facilities" does not modify the noun phrase "pandemic's spread" but the verb "wasted""wasted"¹ and so a spurious indication is made less prominent. Your first supposition is the proper one: avoid confusion, make the meaning as clear as possible.
I say above "more likely" and that the spurious clue is made less prominent because it is possible to have a modification of the noun phrase and still have the prepositional phrase set out between commas. This is according to the principle of restrictive and descriptive elements in a sentence, a typical case being that concerning relative clauses; it is also applied for prepositional phrases (ref.) and thus, in this example it is finally the context that helps determine what element in the sentence is being modified.
¹ It is not very logical to think that "wasted" is the verb being modified, as user PKY noticed in the comments. The verb being modified is almost without doubt the verb "prepare".