If the TSA search your bag they leave a letter inside saying they've done so. Last year I visited the US on holiday, making several internal flights, and my case got searched twice, probably because I had a telescopic metal hiking pole in the case which may have looked like a gun on security scanners.
You're right - they do pack your bag again very tidily - far more so than the way I packed it originally

.