While sleep is a legitimate Expect command, it often appears out of confusion. Sometimes programmers perceive that an Expect script is unreliable, and try to help things along by introduction of a little delay; this is often a symptom of the root cause that they have misunderstood that for which they're waiting. They might have written
expect Password sleep 1 send $next_command\r
where they'd be far better served to write
expect Password: send $next_command\r
Sometimes they simply don't understand expect's pattern-matching at all, and rely on cargo-cultish "dead reckoning" to express their Expect dialogues http://lists.samba.org/archive/samba/2009-May/147978.html .