Used to express that an effort is worth it or has value; 'to be worth the effort' or 'to pay off'.
Long explanation:
The ~かいがあって grammar point is used to convey the idea that an action or effort is worth it, or that it has value. It is often translated as 'to be worth the effort' or 'to pay off' in English. It is typically associated with actions or efforts that led to a successful or desirable result.