XCode compiling dependant .swift file even if dependency changes is private member variables/function

===AService.swift===
class AService { 
	private var a: Int = 0
	func getData() -> Int { 
		return 0
	}
}
===BService.swift===
class BService { 
	private let aService: AService = AService()
	func getData() -> Int { 
		return aService.getData() * 2
	}
}

Please explain why changing
private var a: Int = 0 into private var a: Int = 1
will result in XCode compiling both AService.swift and BService.swift, I am expecting adding/changing any private member variable/member function of a Class wouldn't compile any .swift depended on AService.swift