Divorce alone barely ever works, it's not as simple as that. I'd rather not stir the hornet's nest any further as the topic itself is far more delicate than that. It's just an example of why an increasingly distrustful populace might opt to secure themselves through home surveillance.
>are secret cameras a legal way to get evidence?
Depends entirely on the context and where you live. There are no universal surveillance laws. There are also social aspects outside the realm of court why one would opt to do so.