Was doing some pre track maintenance today and found a loose brake line

. Hard line to braided line connection.
Not sure how it could come loose and last time I went anywhere near them was 2 years ago. Found it by chance because I saw a stray drip.
Any idea how this could happen? Don't want it to happen again ...