よう is used for embedded order, request, advice, etc., similar to ~かどうか for embedded yes-no question.
e.g.
警官が「車を止めるなさい」と言った。
警官が車を止めるよう(に)言った。
医者は「野菜をもっと食べたほうがいいですよ」と勧めた。
医者は野菜をもっと食べるよう(に)勧めた。
彼は「道を譲ってよ」と要求した。
彼は道を譲るよう(に)要求した。
cf.
彼女は「彼は来たの」と聞いた。
彼女は彼が来たかどうか聞いた。
In your example, it's not what the policeman really said, but his gesture works as an order, so よう(に) is used.
EDIT:
I changed my interpretation. It would be more appropriate to interpret that よう(に) shows the purpose of the action. My initial interpreattion "the contents of the action" is also possible, though. に is optional, anyway.