What's the logical reason behind this though ? Can't we just keep the quote button disabled if a topic is locked ?
No, it wouldn't be good. Because then it would be a hassle to use the discussion of that thread as a reference in other threads (scam accusation, reputation topic, private message, AI spam). Rather than copying the entire post, it is easier and more appropriate to use the Quote button to quote the original author, time, and link to the post. I hope you are not having trouble with the Quote button. Next time you write a reply, check if the topic is locked. I hope this kind of problem occurs to very few people.