せっかく (with effort/going to the trouble of) expresses wasted investment. ~てしまった marks the outcome as regrettable and irreversible. 派遣社員 (dispatched/temp worker) is standard employment vocabulary. The combination of せっかく...てしまった perfectly captures the frustration of effort gone to waste.