This answer came rather late but I'm curious which visa did the enquirer traveled on?
Educational visits to schools in the UK are permitted activities for visitors on Standard Visitor Visa, as long as it is not the main purpose of the visit to the UK. The official link is here: https://www.gov.uk/guidance/immigration-rules/immigration-rules-appendix-v-visitor-rules
##Study
Study
25 Visitors may carry out the following study:
(a) educational exchanges or visits with a state funded school or academy or independent school; or
(b) a maximum of 30 days study on:
(i) recreational courses (not English language training);
(ii) a shourt-course (which includes English language training) at an accredited institution;
provided that the main purpose of the visit is not to study and the study is not at a state funded school or academy.
Since observation does not count as a course but more of an educational visit to broaden horizon and deepen educational understandings, it should be taken as activity (a) in above picture.