Shortcode displays only default attribute values

I just tried your exact code, putting the PHP code you pasted above in my theme’s functions.php file, and inserting the shortcode as you typed [sc id="81"] in to a page in my site, publishing the page, and it correctly outputted a value of 81 on my published page.

So something in your theme or a plugin must be conflicting with it.

Try changing to one of the default WordPress themes and testing it again, and/or disabling your plugins.

I suspect it could be a conflict because the parameter is named ‘id‘ – so you could also try using a different parameter name (eg. ‘myid‘).