The reason people testify before Congress is because they ultimately have no choice. Congress has this nuclear option called a "subpoena"[1] to force you to appear.
Now, with prominent people like CEOs and baseball celebrities, it never escalates to the point of issuing a formal subpoena and having Federal marshalls arrest and forcibly drag them into Congressional chambers.
Instead what happens is that Congress members "ask nicely" for somebody to testify (e.g. Sundar Pichai) and then the CEO gets with his lawyers and then coordinates with Congress on a reasonable date to appear. Of course, the CEO can try some stalling tactics (e.g. talk to some Congress members "off the record", etc) to buy some time... but ultimately, he's going to have to face Congress sooner or later. The more promptly the requested witness willingly appears before Congress, the better it is for public perception.
It's better if the CEO shows cooperation with Congress. The totally opposite tactic is for the CEO to show up and refuse to answer any questions by constantly pleading the 5th Amendment through the entire proceeding. That would look really really bad.
[1] https://en.wikipedia.org/wiki/Contempt_of_Congress#Subpoenas
If Congress subpoenas someone, can they also compel them to testify under oath, opening them up to charges of perjury?
I'm not sure why Congress thinks it can at the drop of a hat order a CEO to participate in their media theatrics, and then pitch a fit when the company says "he/she is busy, we're going to send our top legal expert, who should know about the stuff you're concerned with (law) anyway."
That means what you think you know from things you read in the media might actually not be as truthy as what is said when someone has to sit down before a body that has the power to criminalize dishonesty.
And its an important tool for government. There are very public scandals that the people want answers for. You may say it fits nicely with the expectations of office that elected officials might get to the bottom of things that may effect large groups of their constituents.