Razor Components (and their attributes) are added to the razor render tree. as a copy of render tree is keep at the client, it also gets a copy. The client render tree is used to produce the actual html updates to the Dom.
in your sample code, in MainLayout.razor, it renders the markup:
<TestComponent TestParameter="this should not be sent to the client" />
this markup will added to render tree as a component node. any markup generated by this component will be added as children of this component.
note: server version of blazor builds the same render tree as the WASM version would build.