I think a better example may be how would you build a spell checker that highlights mis-spelled words in real time ? You can really go down the rabbit hole in solving this one efficiently and doesn't take a fair amount of the CPU/memory. Understanding string algorithms, dynamic programming, edit distances etc. can give a beautiful, concise and efficient solution without bogging the CPU down. And a background in CS gives you just that.

A naive solution that just tries to guess if a word can be mistyped by trying various permutations would be too slow to use in practice for very large documents as the potential space could be exponential if one just knew how to code/write loops/manipulate objects.

Another classic example is how would you go about programming delivery logistics if you worked for a courier company ? Or even flight connections for a source,destination pair that optimizes price or time (or both). There is no way just coding skills would help you build solutions that scale and be anywhere close to optimal. Having a good grasp on graph algorithms, shortest path algorithms, approximation algorithms (to the traveling salesman problem) would help you solve these fairly quickly. Without this kind of knowledge, it would take a fairly long time to try to come up with something from scratch.

Not to discourage, there are a large number of problems that may not require serious knowledge of CS. Most web apps and simple games may fall under this category.