There are bunch of questions on here asking whether superconductors really have exactly zero resistance and answers saying they do. My question is how this doesn't violate the second law of thermodynamics, which, if I understand correctly, implies that there will always be some energy lost as heat to any system that converts energy to a useful form. Or, in other words, it's fundamentally impossible to convert energy to work with 100% efficiency.
But, if there's no resistance when a current flows through a superconductor, doesn't that mean there's no energy lost as heat? That would seem to imply we're adding energy to a system (by getting a curent going) without increasing the entropy, which should be impossible — more energy means an increased number of possible microstates of the system, which means the ratio of micro to macro states should increase and hence increase the entropy. But I don't see how that can be the case if there's no resistance.
Obviously there's something wrong with my reasoning here, but what? From answers I've seen to similar questions, people said that the energy needed to cool the system down accounts for the second law, but if that were it then surely room temperature superconductors should be impossible even in principle. and yet, reputable scientists have been looking for them anyway. So what am I missing here? Is there some other mechanism through which energy gets converted to heat? And if that's the case, why are superconductors even useful, if there's still energy lost anyway?