The precedence rule definition "Precedence rules provide a way to delay the display of dimensions until they offer a useful refinement of the navigation state." and the example provided in the developer studio "A precedence rule could be defined so that the State dimension would appear only after a dimension value from the Country dimension is selected." make sense to me. But my question here is, Once the State dimension appeared and I select one State, say NY. Now if I clear the Country dimension 'US' what would happen to the State selection? Should it be cleared as part of deselecting the Country? It looks like to me that the State selection NY is still appearing after I deselect the Country.
That is the expected behaviour - a precedence rule is only intended to control when a dimension is displayed for navigation (by restricting it from being displayed until another dimension or dimension value has been selected), it isn't meant to enforce changes to the selected refinements. If you want to create a precedence behaviour that enforces "selection">"sub-selection", and removing "selection" also removes "sub-selection", a hierarchical dimension might be a better fit (depending on your use case).
As Michael said in his reply this is how Precedence rules are supposed to work. You can create a hierarchical dimension to get the desired behavior or if that is not an option you can add logic to your business or presentation layer to remove any sub selection. One approach that I have seen used is to add a dimension value property (e.g. AlsoRemove=xxxx) to store information about any sub-selection that needs to be removed and then use this information in the presentation layer to remove any sub selections.