What is happening here is that in first case you are just assigning function return value to variable $city
$city = Cities::find_by_id($city_id)
and result is pretty much what you would expected. For the second case you are doing something different - you are assigning
Cities::find_by_id($city_id) && $building = Buildings::find_by_id($building_id)
to variable $city which means if Cities::find_by_id and Buildings::find_by_id both return stdObjects there is logical and operator applied.
It is something like:
$city = (object) && (object)
which is pretty much same as
$city = true && true
You would probably want to do something like that (see extra parentheses):
if(($city = Cities::find_by_id($city_id)) && ($building = Buildings::find_by_id($building_id))) {
var_dump($city);
}