c#の挙動が良く分からないのですが、他のオブジェクトにつけたスクリプトにアクセスして、変数を呼び出す場合、何かしらの値を代入するか、printなどで値を出力しないとエラーを返されます。これはどんな仕様によるものでしょうか?

//呼び出し側
rootMap.GetComponent<Grid_controller>().testVal;
//呼び出される側
public int testVal = 1;

エラーは以下です
CS0201 Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement