Roach Motel is a brand of roach trap introduced in the U.S. by Black Flag in 1976. The traps work by giving roaches a way to enter, but not to exit. The advertisements for the produce often end with this line: "Roaches check in, but they don't check out!"
Not long after the product was introduced, people began using it metaphorically. Vincent Canby wrote a review of the movie Escape from New York that appeared on July 10, 1981 in the New York Times:
Manhattan becomes a sort of super Roach Motel: the inmates check in but they don't check out.
In both of the examples you give, the phrase roach motel indicates that the product only works in one direction -- you can only check in, not check out.