If it's possible to have "bad art", then it doesn't really follow that only beautiful or conceptually interesting programs qualify as art. Either it's all art - the beautiful and the interesting with the boring and ugly - or none of it is. Maybe you'd agree 'artfully constructed' covers what you mean?
I think art is contextual. Some art comes with that context built into the mind of the observer, like paintings or music, or something that tells a story - and there are many, many ways to tell a story.
Other art has its context declared for the observer, like Duchamp's 'ready-made' sculptures.
(In very rare circumstances I might consider a program to be art, like the original metacircular Lisp evaluator, even if the author’s express intent wasn’t to appeal to somebody’s emotions.)