What is the table `templatecachequeries` for? What is the content of templatecachequeries table for in Craft 3? Especially the column query?

And is it normal to have a lot of entries (+5000) even on a smaller medium sized page?

Or it is because of badly used {{% cache %}} tag? How does it relate?
There's a great article here that goes in-depth on the {% cache %} template tag and the pros and cons of its usage I'd suggest reading: 
https://nystudio107.com/blog/the-craft-cache-tag-in-depth

Template caching has pretty much remained identical to how it works in Craft 2 for Craft 3 so the article is still relevant.

Also worth linking to the official Craft docs on the subject: https://craftcms.com/docs/templating/cache