The Hokey Pokey dance originated in England
where it was (and still is) called the Hokey Cokey
Possibly it originated from the 17th Century as a mimicry of the Roman Catholic mass. With the priest lifting his arm (putting it in) and lowering it (taking it out) and then turning around and offering the the consecrated bread to the mass.
The term Hokey Cokey is a corruption (perhaps due to the fact that the non-latin speaking mass had no idea what what he was talking about) of Hoc est corpus: 'This is my body'. (which is what it's all about)
"knees bent" is a mimicry of genuflection,"arm stretch" is a mimicry of the priests outstretched and open arms, and "ra-ra-ra", is the priest warbling on in some unknown language
When it travelled to America, Cokey was replaced with Pokey possibly due to the popular "Hocus Pocus", which infered fooling around and trickery (in the 19th century).
From what I have been told. That is what it is all about.