The primary obligation to provide education to children lies with the state and participation of private unaided schools has been permitted out of necessity since the state is unable to perform its function adequately, the Delhi High Court said on Wednesday.