OH is a polyatomic ion, meaning it is a covalently bonded set of two or more atoms (in this case Oxygen and Hydrogen). When there is more than one mole or atom of an ion present in a formula, polyatomic ions are written in parentheses to show that they are bonded and the subscript is used to show that there are multiple of that bonded ion present. OH is Hydroxide, which consists of Oxygen and Hydrogen, so yes there are two of each element in the formula but because they are bonded to form Hydroxide, OH is in parentheses, therefore Ca(OH)2 is the correct formula.
(in short it is Ca(OH)2 because OH is a bonded ion)