http://www.rto.gov.bc.ca/
I think he's suggesting that you just leave, and hope that the security deposit is enough to them to not make them come after you for it. Since you're out of province, it's unlikely they'll pursue you (it's a pain to go out of province), but your friend there could be screwed if they decide to repossess his stuff to pay for unpaid rent (I know it can be done in Alberta, not totally sure about BC).
If it's a fixed term lease, then you are obligated to pay it for the full term. The only way out early is if the landlord agrees to let you out early, or as you have said if they agree to let you sublet, which they've done.
For things like no locks or no heat, then you could have probably left if they went unresolved, but if the landlord eventually resolved those, then you are still obligated.
Look at it this way, if the situations were reversed and people were renting from you, what would you want them to do?
You committed yourself, the adult thing to do is to live up to your commitments. Try and work with them, let them know the subletting isn't working. Maybe they'll accept a reduced rent rate for the months you are gone (less work for them if it's empty)? Ask them to advertise it and if it rents before the end of your agreement then you are off the hook.
Either way, it's always better to try and find a resolution that works for everyone, rather than simply skipping out on a commitment simply because it doesn't suit you anymore.