せっかく and のに are used together when great effort has been put into something, yet that effort may be going to waste.
The situation reflecting the effort appears between せっかく and のに.
- Kamiya, Takeo. “Adverbs Expressing Circumstances.” The Handbook of Japanese Adjectives and Adverbs, Kodansha, 2002, p. 191
- How to use せっかく ( = sekkaku) (maggiesensei.com)
Is the Order a Rabbit? » Volume 1 » Page 99 (Left) » Panel 4
After Cocoa has a string of bad luck throughout the day, Chiya takes her to the tea shop where Syaro works to get her mind off everything that happened. Just as Cocoa’s finally cheered up, Syaro comments to herself about her own bad luck, returning Cocoa to gloom. Chiya chastises Syaro: “We went through the trouble to forgot about today, so don’t say bad luck!”