I won't tell you something new because you already know the answer yourself and all the greatest companies you see around been created by great tech talents / inventors. If you believe business is easy, you will just hire that talent, believe that that talent would be happy to invest his/her own time on you and something great will happen from that in the end, then it's called an idiotism.
In the context of your question I will assume that by CEO you mean main co-founder in a tech company.
In any small-medium tech company CEO should code simply because he has main vision, usually has best skills and basically he can produce better and faster results without hiring expensive engineers.
If CEO of a tech startup is not a smart tech person, that startup will fail. Even if you will find a good CTO, which is very hard and expensive, you still won't move as fast as you could.
However, the main role of the CEO is culture, strategy, organization and business and bigger company becomes, less time CEO has on dealing with typical coding and if there is something you can delegate, you should delegate.
Apart from typical coding there is also research, data science, product design in general including software design and architecture. If you have great minds you can trust and everything is moving smoothly, you don't need to jump into the coding process yourself, you just "keep an eye" on it and only when really necessary you may solve some top-level complicated problems yourself.
If you are a great Leader who cares about a technology, product, quality, brand, research, company, customers and employees then you always will be part of that process.
All CEO's I've met where coding in the past and still doing it sometimes. My opinion is absolutely positive and even more - it is a requirement for me, I ignored all offers where CEO wasn't a tech mind simply because it won't move company anywhere in long-term and that person would never understand you, speak your language. Of course, when CEO is helping with dirty job (coding) it helps company as well.