O'Rourke was an incumbent in the House who then ran for election to the Senate and lost. Shouldn't he then no longer be part of Congress, since he only ran in one race and did not win? Why does he automatically keep his previous post?
His current term to the US House has not ended yet; it ends on January 3, 2019, which is the start of the next Congress. This is mandated in the 20th Amendment to the United States Constitution.
..., and the terms of Senators and Representatives at noon on the 3d day of January, of the years in which such terms would have ended if this article had not been ratified; and the terms of their successors shall then begin.