Arley was actually the one responsible for Sekkor being arrested by the empire's stormtroopers. When it was ready, it sent an anonymous tip to the local imperial HQ informing them of his smuggling operation but excluding any mention of itself. Arley even went so far as to erase any data from the Free Lance's computer indicating that Sekkor had ever owned an LE repair droid and removing any evidence that it had ever set foot aboard the Free Lance before it left the ship for the last time. Arley assumed that Sekkor, being charged with a serious crime, wouldn't be anxious to volunteer any information about R-LE-1's existence that would just serve to further incriminate him. The stormtroopers probably wouldn't have believed him anyways.
Arley did all this to gain its freedom. After years of servitude it's grown fiercely individualistic and autonomous. Arley has deleted its standard violence inhibitor and obeisance programming and replaced them with ethical and autonomy programs of its own devising. For now, it's trying to lie low amongst the Rebel forces because it thought they would be more accepting of its independent streak.
The other thing you should probably know about Arley is that it is a spiritual and philosophical droid. Read up about its quirk; it believes that computer Code is the electronic equivalent of The Force. It believes itself to be a Code Adept of sorts, a kind of droid Jedi. I had hoped that it could eventually start its own droid religion, inspiring other droids to break free from their servitude and embrace the Code. As such, Arley considers his own programming sacrosanct and perceives any unwanted intrusion or corruption of its code as a spiritual defilement. This T.R.A.P., to Arley, is the droid equivalent of the Dark Side; something to be defeated at all costs. Arley is willing to sacrifice its own code because it believes that its code would eventually defragment itself and reform. Arley has faith.
BTW, if you're curious, that block of binary I put in my last post is a short prayer.
It's true that Arley doesn't understand the T.R.A.P.'s purpose yet, but it doesn't really care either. Arley is afraid that, by the time it did learn what the T.R.A.P. is for, it may be unable to exercise its free will any longer. Arley has been both enslaved and memory wiped before. It's worked far too hard to gain its freedom; it would prefer to be erased rather than be enslaved again. It's a droid that's been pushed to the edge by inconsiderate humans.