I don't know about specifically at ORD, but I've gone through TSA to the 'wrong' terminal many times at different airports and have never had a problem. They sometimes tell me I'm in the wrong place but they let me through after I explain the reason.