Think about the next person.
If it had of been the front brake that failed (the far more critical one) while you were exiting the 401 (for example) it could have ended very badly.
Or that hanging wire harness wore through your back tire while you were on a busy highway and sent you into opposing traffic. Same thing, could end very badly.
Don't try to blame yourself - you paid good money to have someone who was supposedly trained and knowledgeable to inspect the bike and tell you that it was safe. It's not your job nor did you at the time have the knowledge to draw a conclusion one way or another. The person you paid to tell you that your bike was safe failed to do their job putting YOUR life at risk as a direct result. Thankfully your situation (which was hardly a minor thing, you suffered a complete loss of 50% of your brakes!) didn't end badly but eventually someone is going to get injured or worse as a result of that sort of shoddy work.