A website can be fully rendered on the server at load time and still being interactive on the client side after that initial load.
In that situation, if you want to interactively create a table on your webpage, then you can either use generic DOM methods (which I suspect is the most common way), or you can use the dedicated API.
That's how we did websites back in the 2000s and that's still how most of them are made in practice because the “legacy” tech never went away even if it has minimal visibility on tech forums like HN.