I think you're saying that having html returned from the backend "seems questionable" and is a "type of bad programming".
But that can't be right because that's mostly how the web works? Make a request to a server, server returns html.
Is your issue that it's partial "random" content? How does that make it worse? It's a tried and true solution. The hamburger menu in amazon.com does just that.
I agree that the objection doesn't hold up given how many websites are made, but I think they mean that a REST API shouldn't be returning HTML, which is true. Unfortunately using the replace feature would mean rewriting existing APIs.
I think you're saying that having html returned from the backend "seems questionable" and is a "type of bad programming".
But that can't be right because that's mostly how the web works? Make a request to a server, server returns html.
Is your issue that it's partial "random" content? How does that make it worse? It's a tried and true solution. The hamburger menu in amazon.com does just that.