Is the following use of have and behavior correct?
All programs have the expected behavior.
Yes. That is reasonable, idiomatic English.
One might instead say that the programs 'show' or 'exhibit' the expected behaviour, and you might or might not put the 'u' in behaviour, but the original sentence is very reasonable. It's probably an unrealistic claim — programs don't often all have the expected behaviour — but that's a different discussion.