It's not a horrible answer, though it wouldn't make my top 3 list. Learning different models of programming is almost always worthwhile, though how much time you put in will depend on your objectives. Languages and systems in the declarative/logical/relational vein like Prolog, minikanren, and others are worth examining at least once. If you grok them, it can be very handy with prototyping, even if it doesn't make it into production. And if you really grok them, you can Greenspun a Prolog into your system more effectively when it turns out its model is actually appropriate to a portion of the system.
With regard to this, though:
> When you modify it, you have to understand the logical world state.
That's true of any non-trivial program someone may write and/or modify. Changing without understanding is just going to get your garbage (perhaps functional garbage, but still garbage).
Prolog certainly has been used in industry; https://en.wikipedia.org/wiki/Prolog#Use_in_industry has some useful discussion, and https://news.ycombinator.com/item?id=29539384 talks about its use in network software.