The Almshouses at Kirkleatham were founded in 1676
The bastions are a later addition thought to date from around 1820.
They are very similar in style to others in the area. One bastion originally housed a laundry and the other was a storage area.
Sir William Turners Almshouse Bastions, Kirkleatham

Are they just decorative?
Laundry and Storerooms at one point apparently, not sure if they still are. No guns if thats what you mean !
One is a store room the other a flat for visitiors. I was brought up round Kirkleatham (2012)