I want to thank zwbetz for the solution I found on his website - https://zwbetz.com/style-a-markdown-table-with-bootstrap-classes-in-hugo/ - how to load a table from .md file! Works fine!
Zachary, it would be so nice if you can explain your shortcode. I think you were trying to create a shortcode for any table on the site, and to assign individual styling to it with $class - did you?
"<table class=\"%s\">" $class }}
It is not very clear how you were going to use it.