Why is Ryan still in office?
Could it be to act as President if both Trump and Pence are removed from office?
The original Constitution provides that if neither the President nor Vice President can serve, the Congress shall provide law stating who is next in line. Currently that law exists as 3 USC 19, a section of the U.S. Code. This law was established as part of the Presidential Succession Act of 1947. There, the following line of succession is provided:
Speaker of the House of Representatives
President Pro Tempore of the Senate
Secretary of State
Secretary of the Treasury
Secretary of Defense
Attorney General
Secretary of the Interior
Secretary of Agriculture
Secretary of Commerce
Secretary of Labor
Secretary of Health and Human Services
Secretary of Housing and Urban Development
Secretary of Transportation
Secretary of Energy
Secretary of Education
Secretary of Veterans Affairs
Secretary of Homeland Security
https://usconstitution.net/consttop_succ.html